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

Switch to Plain View
Hive >> mail # user >> Hive Query


+
yogesh.kumar13@... 2012-07-24, 07:14
Copy link to this message
-
Re: Hive Query

Hi Yogesh

Can you try out this?

select count(*), site.name from sitealias join site on (site_alias.site_id=site.site_id) Group By site.name;
Regards
Bejoy KS

Sent from handheld, please excuse typos.

-----Original Message-----
From: <[EMAIL PROTECTED]>
Date: Tue, 24 Jul 2012 07:14:25
To: <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Hive Query

Hi all,

I have two tables
1) sitealias
2) site
sitealias contains
-------------------------
id                   site_id
----------------------------
1                        15
2                        12
3                        12
4                        15
---------------------------

site contains

-----------------------------
site_id                        name
-------------------------------
12                        google
13                        wiki
14                        yahoo
15                        flipcart
---------------------------------

I am runing a query to perform equi join and to result  how many times same site_id repeats and its name and it gets group bi site id.

result of query I want

---------------------------------
site_id                name
---------------------------------
2                        google
2                        flipcart
----------------------------------
I performed
select sitealias.count(*), site.name from sitealias join site on (site_alias.site_id=site.site_id);

it shows error :  Parse Error:  mismatched input '(' expecting FROM near 'count' in from clause
Please help and suggest a query of this kind of operations.
Thanks & Regards
Yogesh Kumar

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

+
yogesh.kumar13@... 2012-07-24, 08:09
+
Bejoy Ks 2012-07-24, 09:03
+
yogesh.kumar13@... 2012-07-24, 09:26
+
Bejoy Ks 2012-07-24, 09:40
+
yogesh.kumar13@... 2012-07-24, 10:24
+
Bejoy Ks 2012-07-24, 10:48
+
yogesh.kumar13@... 2012-07-24, 10:50
+
yogesh.kumar13@... 2012-07-24, 10:17
+
yogesh.kumar13@... 2012-07-24, 07:52
+
Manickam P 2013-07-12, 11:13