Built-in Functions → count
count() is an aggregation function that returns the number of elements in a column.
count(<object> expr, [groupBy(...)])
- expr : expression evaluating to any Incorta column type
groupBy: optional grouping function that specifies which group of data to operate over
If you use the
groupBy function to count the number of items in each group, you must include all the leading grouping dimensions in the Insight from the top-down to the level-based measure you want to evaluate. For more information, refer to Aggregation with a Level Based Measure.
long or as many
longs as there are groups if
groupBy is used
- Count the total number of elements in the AMOUNT_SOLD.
- Count the number of elements in AMOUNT_SOLD as grouped by CITY.