Help with last 30 day unique user query

2010-10-15 Thread Vijay
Hi, I need help with this scenario. We have a table of events which has columns date, event (not important for this discussion), and user_id. It is obviously easy to find number of unique users for each day. I also need to find number of unique users in the last 30 days for each day. This is also

Re: Help with last 30 day unique user query

2010-10-15 Thread Alex Boisvert
As far as I know, Hive has no built-in support for sliding-window analytics. There is an enhancement request here: https://issues.apache.org/jira/browse/HIVE-896 https://issues.apache.org/jira/browse/HIVE-896Without such support, the brute force way of doing things is, SELECT COUNT(DISTINCT