I am working on query to get cumulative distinct count of uids on daily basis.
Example : Say there are 2 uids (100,200) appeared on date 2016-11-01 and they also appea
easiest way:
SELECT *, count(*) over (order by fst_date ) cum_uids FROM ( SELECT uid, min(date) fst_date FROM t GROUP BY uid ) t
or something like this