Support Questions
Find answers, ask questions, and share your expertise

hive select distinct count error

Explorer

HI, 

 

I am running a select distinct count on a column, am getting the below error. can you please help me.

select distinct count (id) from hive_table_tbs;

 

error message

Error while compiling statement: FAILED: SemanticException [Error 10128]: line 1:16 Not yet supported place for UDAF 'count'

 

Thank You

1 ACCEPTED SOLUTION

New Contributor

Try with below query and share the output,

 

select count (distinct id) from hive_table_tbs;

View solution in original post

4 REPLIES 4

New Contributor

Try with below query and share the output,

 

select count (distinct id) from hive_table_tbs;

Explorer

Thank you. I query run fine. 

 

select count (distinct id) from hive_table_tbs;

output:

1092

New Contributor

Welcome @

Moderator

Please find here the Apache Hive tutorial and more information on selecting distinct values under the Aggregations section.

 

For more on the Apache Hive content roadmap, please refer to our documentation.


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

; ;