>On Wed, Jun 27, 2012 at 11:32 PM, Gesli, Nicole
> wrote:
>> Soham, I think you need something like this:
>>
>> SELECT ui.country, COUNT(1)
>> FROM ( SELECT DISTINCT userid
>> FROM users_audit
>>WHERE SUBSTR(ua.logtime, 1, 17) >= '2
7;
> ) ua
> JOIN
> users_info ui ON (ui.id = ua.userid)
> GROUP BY
> ui.country;
>
> -Nicole
>
> From: Nitin Pawar
> Reply-To:
> Date: Wed, 27 Jun 2012 15:22:23 +0530
>
> To:
> Subject: Re: date datatype in hive
>
> soham,
>
> th
JOIN
users_info ui ON (ui.id = ua.userid)
GROUP BY
ui.country;
-Nicole
From: Nitin Pawar mailto:nitinpawar...@gmail.com>>
Reply-To: mailto:user@hive.apache.org>>
Date: Wed, 27 Jun 2012 15:22:23 +0530
To: mailto:user@hive.apache.org>>
Subject: Re: date datatype in hi
> >> > well. Something like
> >> >
> >> > select country,name from users_info group by country;
> >> >
> >> > Regards
> >> > Bejoy KS
> >> >
> >> > Sent from handheld, please excuse typos.
> >&
>> >
>> > Regards
>> > Bejoy KS
>> >
>> > Sent from handheld, please excuse typos.
>> >
>> > -Original Message-
>> > From: Soham Sardar
>> > Date: Wed, 27 Jun 2012 11:57:23
>> > To: ; Bejoy K
from handheld, please excuse typos.
> >
> > -Original Message-
> > From: Soham Sardar
> > Date: Wed, 27 Jun 2012 11:57:23
> > To: ; Bejoy Ks
> > Reply-To: user@hive.apache.org
> > Subject: Re: date datatype in hive
> >
> > And btw does grou
27 Jun 2012 11:57:23
> To: ; Bejoy Ks
> Reply-To: user@hive.apache.org
> Subject: Re: date datatype in hive
>
> And btw does group by works in hive because the same wuery i am
> running in mysql and its working fine but its failing in hive
>
> select name from users_info
To: ; Bejoy Ks
Reply-To: user@hive.apache.org
Subject: Re: date datatype in hive
And btw does group by works in hive because the same wuery i am
running in mysql and its working fine but its failing in hive
select name from users_info group by country;
in mysql its working but whn i try to run
And btw does group by works in hive because the same wuery i am
running in mysql and its working fine but its failing in hive
select name from users_info group by country;
in mysql its working but whn i try to run it in hive its telling
hive> select name from users_info group by country;
FAILE
See Bejoy and Everyone ,
I have two tables
one users_info and one users_audit
in hive ..
hive> desc users_audit;
OK
id int
userid int
logtime string
hive> desc users_info;
OK
id int
namestring
age int
country string
gender string
bdaystring
n
Hi Soham
Hive Supports pretty much all the primitive data types including INT. For a
detaild list please refer
https://cwiki.apache.org/confluence/display/Hive/Tutorial#Tutorial-PrimitiveTypes
The only draw back as in common is when you have the data type as String you
cannot use it directly
11 matches
Mail list logo