Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Group by not working

Group by not working

New Contributor

I have a table ratings with columns posted(timestamp), cust_id (int), prod_id(int), rating(tinyint), message(string). 

 

I want to have the following query 

 

SELECT *

FROM ratings

GROUP BY prod_id

Having count(ratings) >= 50 

 

But I continuously get the error, "Expression not in group by key" 

 

Don't have an account?
Coming from Hortonworks? Activate your account here