citusdata / postgresql-hll

PostgreSQL extension adding HyperLogLog data structures as a native data type
http://blog.aggregateknowledge.com/2013/02/04/open-source-release-postgresql-hll/
Apache License 2.0
1.12k stars 116 forks source link

Using hll_cardinality(hll_union_agg(users)) with OVER partition by #19

Open Dagnan opened 10 years ago

Dagnan commented 10 years ago

Hi, There is an example about using #hll_union_agg(users) OVER (ORDER BY date ASC ROWS 6 PRECEDING).

However if I try to use it with OVER(partition by date) it does not work: ERROR: column "users" must appear in the GROUP BY clause or be used in an aggregate function.

ghost commented 9 years ago

Hi @Dagnan, could you please provide the whole query you're running? Not sure thatI can help with the information you've provided.

Dagnan commented 9 years ago

Hi. I'm sorry I'm not using postgres-hll directly but I think the request itself was SELECT #hll_union_agg(users) OVER (ORDER BY date ASC ROWS 6 PRECEDING).