Re: count distinct

2015-06-23 Thread Michael McAllister
of a couple of columns. When I try the following:- select count(distinct a.col1, b.col2) from table tab1 a inner join tab2 b on b.joincol = a.joincol where a.col3 = ‘some condition’ and b.col4 = ‘some other condition'; I get the following error:- Error: ERROR 605 (42P00): Syntax error. Unknown

Re: count distinct

2015-06-23 Thread James Taylor
Michael, You're correct, count distinct doesn't support multiple arguments currently (I filed PHOENIX-2062 for this). Another workaround is to combine a.col1 and b.col2 into an expression, for example concatenating them. If order matters, you could do this: select count(distinct col1 || col2

Re: count distinct

2015-06-23 Thread Maryann Xue
the following:- select count(distinct a.col1, b.col2) from table tab1 a inner join tab2 b on b.joincol = a.joincol where a.col3 = ‘some condition’ and b.col4 = ‘some other condition'; I get the following error:- Error: ERROR 605 (42P00): Syntax error. Unknown function: DISTINCT_COUNT. (state

Re: count distinct

2015-06-23 Thread Maryann Xue
to Phoenix 4.2 on HDP 2.2) I have a situation where I want to count the distinct combination of a couple of columns. When I try the following:- select count(distinct a.col1, b.col2) from table tab1 a inner join tab2 b on b.joincol = a.joincol where a.col3 = ‘some condition’ and b.col4

Fwd: Issues w/ count (distinct col) queries via phoenix table with secondary indexes

2015-04-28 Thread Jude K
(or workaround) as we need fast retrieval and proper counting? We have the following environment: Hbase 0.98.4.2.2.0.0 Phoenix: 4.2.0.2.2.0.0-2041 Core (CPU) - 8 RAM - 29 Gb OS:centos6 (x86_64) QUERY +++ SELECT A.COL1, A.COL2, COUNT(DISTINCT A.COL3), COUNT(DISTINCT A.COL4) FROM

Re: Issues w/ count (distinct col) queries via phoenix table with secondary indexes

2015-04-28 Thread James Taylor
Phoenix: 4.2.0.2.2.0.0-2041 Core (CPU) - 8 RAM - 29 Gb OS:centos6 (x86_64) QUERY +++ SELECT A.COL1, A.COL2, COUNT(DISTINCT A.COL3), COUNT(DISTINCT A.COL4) FROM A WHERE A.COL5 = 1427864399000 AND A.COL5 = 1427947199000 GROUP BY A.COL1, A.COL2 HAVING COUNT

Issues w/ count (distinct col) queries via phoenix table with secondary indexes

2015-04-28 Thread Jude K
) as we need fast retrieval and proper counting? We have the following environment: Hbase 0.98.4.2.2.0.0 Phoenix: 4.2.0.2.2.0.0-2041 Core (CPU) - 8 RAM - 29 Gb OS:centos6 (x86_64) QUERY +++ SELECT A.COL1, A.COL2, COUNT(DISTINCT A.COL3), COUNT(DISTINCT A.COL4) FROM A WHERE