REGR_COUNT Function Example | Teradata Vantage - 17.00 - 17.05 - Example: Returning the Number of Rows in regrtbl - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval

This example is based the following regrtbl data. Nulls are indicated by the QUESTION MARK character.

c1 height weight
1 60 84
2 62 95
3 64 140
4 66 155
5 68 119
6 70 175
7 72 145
8 74 197
9 76 150
10 76 ?
11 ? 150
12 ? ?

The following SELECT statement returns the number of rows in regrtbl where neither height nor weight is null.

   SELECT REG_COUNT(weight,height) 
   FROM regrtbl;
   

Here is the result:

   Regr_Count(weight,height)
   -------------------------
                           9