Hi, Count is a function, so you need to wrap its parameters with parentheses (see http://phoenix.apache.org/language/functions.html#count for the exact grammar).
Writing your query as "select count(distinct id) from session" should resolve this issue. - Gabriel On Mon, Jun 16, 2014 at 9:54 AM, Pham Phuong Tu <[email protected]> wrote: > Hi guys, > > I cann't run this type of query with Phoenix > > - Phoenix shell > >> select count distinct (id) from session; > >> Error: ERROR 601 (42P00): Syntax error. Encountered "distinct" at line 1, >> column 14. (state=42P00,code=601) > > > But this query still ok > >> select distinct (id) from session; > > Please tell me how to do this, thanks. > > -- > ----------------------------------------- > > Pham Phuong Tu > Back-end & Big data developer > Skype: phamphuongtu
