Re: sbuqueries and distinct counts.

2014-04-21 Thread Alexander Reelsen
Hey, you may want to provide a gist with some sample data, so people can follow.. Also you might need to use the value_count aggregation somewhere, to make sure you are only using the counts, but this really depends on your data model and the data being indexed, so full gist might help a lot.

Re: sbuqueries and distinct counts.

2014-04-10 Thread Tim Uckun
I hate to bump myself but does anybody have any input on this at all? On Thursday, April 10, 2014 11:59:43 AM UTC+12, Tim Uckun wrote: I want to do something like this. select date_trunc('month', time_stamp), sum(distinct_count) from ( select date_trunc('week', time_stamp) as

sbuqueries and distinct counts.

2014-04-09 Thread Tim Uckun
I want to do something like this. select date_trunc('month', time_stamp), sum(distinct_count) from ( select date_trunc('week', time_stamp) as time_stamp, count(distinct field_name) as distinct_count from blah group by date_trun('week', time_stamp) ) group by