Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Help with last 30 day unique user query


Copy link to this message
-
Help with last 30 day unique user query
Vijay 2010-10-15, 06:36
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
quite simple to do for one day. However, I cannot figure out how to do this
for a range of days. Something like this is pretty straightforward in most
RDBMS but with HiveQL has I'm finding this hard. I might be missing
something simple though. Any help is appreciated. Ideally the query should
also be as optimized as possible as this table could be huge.

Thanks,
Vijay