@jot6278 wrote:
Hi there,
I am having trouble calculating the distinct count of IDs over a certain group of rows using the OVER clause but it doesn’t seem to take the DISTINCT keyword.
Code:
COUNT(DISTINCT COALESCE(ABC,0)) OVER (ORDER BY XYZ ROWS BETWEEN 3 PRECEDING AND CURRENT ROW)
Error:
Distinct option is invalid with OVER phrase
Thanks in advance
Posts: 1
Participants: 1