COUNT DISTINCT and window functions

COUNT DISTINCT and window functions