'select count distinct over another value doesn't work
I don't know why Snowflake can't calculate my value. This table contains multiple periods for multiple Users, and a user can have X times the same period.
SELECT DISTINCT("Period"),COUNT(DISTINCT"Users")
FROM "DB"."SCHEMA"."TABLE"
I get the following result:
SQL compilation error: ["TABLE"."Period"] is not a valid group by expression
What's wrong with my statement?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
