Skip to main content
Sample01
Gold ⭐️
March 1, 2021
Solved

hive select distinct count error

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

Venkateshmr
Gold ⭐️
March 2, 2021

Try with below query and share the output,

 

select count (distinct id) from hive_table_tbs;

4 replies

Venkateshmr
Gold ⭐️
March 2, 2021

Try with below query and share the output,

 

select count (distinct id) from hive_table_tbs;

Translate
Sample01
Sample01Author
Gold ⭐️
March 2, 2021

Thank you. I query run fine. 

 

select count (distinct id) from hive_table_tbs;

output:

1092

Translate
Venkateshmr
Gold ⭐️
March 2, 2021

Welcome @

Translate