Stay organized with collections
Save and categorize content based on your preferences.
count_distinct
The count_distinct function returns the number of rows that have distinct
values within a group. It is often used with match to get counts for
specific groups in the data.
Syntax
Param data types
Return type
count_distinct(expression)
STRING
NUMBER
Code Samples
Return count of distinct user logins
Return the count of distinct successful user logins over time.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-07-27 UTC."],[],[]]