RE: hive union all same table

2015-03-31 Thread zhangjp
hive> select ti,count(1) from xx where day=20150330 group by ti> union all > select ti,count(1) from xx where day=20150330 group by ti;Total jobs = 3Launching Job 1 out of 3 From: smart...@hotmail.com To: user@hive.apache.org Subject: hive union all same table Date: Wed, 1 Ap

hive union all same table

2015-03-31 Thread zhangjp
Hi I want to query table_a by different where clause as follow select * from ( select col1, count(1) from table_a where col2 ='xx' group by col1 union all select col1, count(1) from table_a where col2 ='xx' group by col1 union all select col1, count(1)