Count - Teradata Warehouse Miner

Teradata® Warehouse Miner™ User Guide - Volume 2ADS Generation

Product
Teradata Warehouse Miner
Release Number
5.4.6
Published
November 2018
Language
English (United States)
Last Update
2018-12-07
dita:mapPath
gxn1538171534877.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2301
Product Category
Software

The standard count function is supported, generating either COUNT(*) or COUNT (expression) and returning a value of type integer in Teradata run mode or decimal(15,0) in ANSI run mode. When dragging a Count into a variable, the following tree element is created.

Variable Creation > Input > Variables: SQL Elements pane - Aggregation > Count

Variable Creation > Input > Variables: SQL Elements pane - Aggregation > Count (empty)

If the Count element is dropped or selected onto an empty node, an Asterisk (*) is generated by default, resulting in the familiar COUNT(*) SQL phrase. If, however, the Count element is dropped or selected onto a node that is not empty, the contents of the target node replaces the Asterisk under the resulting Count node. The Asterisk may also be replaced by moving a non-aggregate expression over it in the tree. If necessary, an Asterisk can be restored by moving an Asterisk element from the Other category of SQL Elements.

The option to compute the count only over distinct values only is provided, resulting in the generation of COUNT(DISTINCT expression).
The DISTINCT option should not be used when Asterisk is the operand of the Count function.
The DISTINCT option is enabled through the Properties panel. Double-click on Count, or highlight it and click Properties.
Variable Creation > Input > Variables: SQL Elements pane - Aggregation > Count Properties