Hi Gwen,
SELECT DISTINCT is processed after the OPAP function and COUNT(DISTINCT) can't be used in OLAP, but in this case you don't need it, just GROUP BY first:
SELECT
name
, hair_colour
, COUNT(hair_colour) OVER (PARTITION BY name)
FROM
MyTable
GROUP BY
name
, hair_colour;
Dieter
Hi Gwen,
SELECT DISTINCT is processed after the OPAP function and COUNT(DISTINCT) can't be used in OLAP, but in this case you don't need it, just GROUP BY first:
Dieter