There are 3 columns in my hive data (user, gender, rating). now, I want to count number of user_id, gender wise. I have written hive code as
select user_id, gender, count(*) from u_user group by user_id;
but the error that I have got is
SemanticException [Error 10025]: Line 1:16 Expression not in GROUP BY key 'gender'
How to fix this?