hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Hive Query
Date Tue, 24 Jul 2012 07:14:25 GMT
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(*), 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.

View raw message