Could convert them to unix time which will give you two bigints that you
can subtract to get seconds, and divide result by 60 to get minutes, etc.
Tom
On Wed, Nov 21, 2012 at 3:15 PM, qiaoresearcher wrote:
> Hi All,
>
> Assume we have two time stamp like:9/15/2002 8:05 and9/15/2002
>
table of unique dates using the
> above condition. Then, you would join your data with that table on
> start_date and group by end_date counting distinct user_ids. Hope I got
> that right :)
>
> The latter approach will essentially multiply the number of rows by 30.
>
> igor
>
T(userid)) FROM logins WHERE day - logins.day
> < 30 GROUP BY day;
>
> On Thu, Oct 11, 2012 at 6:05 AM, Tom Hubina wrote:
> > I'm trying to compute the number of active users in the previous 30 days
> for
> > each day over a date range. I can't think of any way to do it
ay im calculating the count for. Let me know
> if you need an example.
>
> Cheers,
> R
>
>
> On Wed, Oct 10, 2012 at 3:05 PM, Tom Hubina wrote:
>
>> I'm trying to compute the number of active users in the previous 30 days
>> for each day over a date range. I
I'm trying to compute the number of active users in the previous 30 days
for each day over a date range. I can't think of any way to do it directly
within Hive so I'm wondering if you guys have any ideas.
Basically the algorithm is something like:
For each day in date range:
SELECT day, COUNT(