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

Switch to Plain View
Hive >> mail # user >> distinct with union all


+
Rakesh Setty 2009-07-02, 19:37
+
Namit Jain 2009-07-02, 20:24
+
Rakesh Setty 2009-07-02, 20:54
+
Namit Jain 2009-07-02, 21:23
+
Rakesh Setty 2009-07-02, 21:46
Copy link to this message
-
Re: distinct with union all

make sure you don't have any leading or trailing spaces (or special
characters) for the usernames being extracted.

also to debug, try to do a select username, count(1) then group by username

-- amr

Rakesh Setty wrote:
>
> Yes, I am getting duplicate usernames.
>
>  
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Namit Jain [mailto:[EMAIL PROTECTED]]
> *Sent:* Thursday, July 02, 2009 1:25 PM
> *To:* [EMAIL PROTECTED]
> *Subject:* RE: distinct with union all
>
>  
>
> Are you getting duplicate usernames ?
>
>  
>
>  
>
> *From:* Rakesh Setty [mailto:[EMAIL PROTECTED]]
> *Sent:* Thursday, July 02, 2009 12:37 PM
> *To:* [EMAIL PROTECTED]
> *Subject:* distinct with union all
>
>  
>
> Hi,
>
>  
>
> I have a query like
>
>  
>
> select distinct username from (select user as username from page_views
> pv union all select name as username from users u) ur;
>
>  
>
> But I see that result is not actually distinct. Am I missing something
> here?
>
>  
>
> Thanks,
>
> Rakesh
>
+
Namit Jain 2009-07-03, 00:59
+
Rakesh Setty 2009-07-06, 16:45
+
Namit Jain 2009-07-06, 17:03
+
Ashish Thusoo 2009-07-06, 19:16
+
Rakesh Setty 2009-07-06, 20:19
+
Namit Jain 2009-07-06, 20:29
+
Rakesh Setty 2009-07-06, 20:35
+
Namit Jain 2009-07-06, 21:21
+
Namit Jain 2009-07-07, 19:01
+
Namit Jain 2009-07-08, 17:34