Re: date datatype in hive

2012-06-28 Thread Gesli, Nicole
>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

Re: date datatype in hive

2012-06-27 Thread Soham Sardar
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

Re: date datatype in hive

2012-06-27 Thread Gesli, Nicole
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

Re: date datatype in hive

2012-06-27 Thread Nitin Pawar
> >> > well. Something like > >> > > >> > select country,name from users_info group by country; > >> > > >> > Regards > >> > Bejoy KS > >> > > >> > Sent from handheld, please excuse typos. > >&

Re: date datatype in hive

2012-06-27 Thread Soham Sardar
>> > >> > 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

Re: date datatype in hive

2012-06-27 Thread Nitin Pawar
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

Re: date datatype in hive

2012-06-26 Thread Soham Sardar
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  

Re: date datatype in hive

2012-06-26 Thread Bejoy KS
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

Re: date datatype in hive

2012-06-26 Thread Soham Sardar
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

Re: date datatype in hive

2012-06-26 Thread Soham Sardar
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

Re: date datatype in hive

2012-06-26 Thread Bejoy Ks
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