How to count the frequency of multiple items in a row and across many rows in a Snowflake table
While performing data analysis, this is a classic scenario where we want to count the number of occurrences of a particular value.
How to count the number of occurrences of a particular value in a table
To find the number of occurrences of Badge_color for each employee:
count(1) as num_times
group by Employee, Badge_color;