arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

SEGMENTPARTITIONEDDISTINCTCOUNT

This section contains reference documentation for the SEGMENTPARTITIONEDDISTINCTCOUNT function.

Returns the count of distinct values of a column when the column is pre-partitioned for each segment, where there is no common value within different segments. This function calculates the exact count of distinct values within the segment, then simply sums up the results from different segments to get the final result.

circle-exclamation

This function relies on the expression values being partitioned for each segment, where there are no common values within different segments.

hashtag
Signature

SEGMENTPARTITIONEDDISTINCTCOUNT(colName)

hashtag
Usage Examples

These examples are based on the .

value
select SEGMENTPARTITIONEDDISTINCTCOUNT(teamID) AS value
from baseballStats 

149

Batch Quick Start