Aggregated Expression not in GROUP BY key

2015-07-29 Thread James Pirz
Hi, I am using Hive 1.2, and I am trying to run some queries based on TPCH schema. My original query is: SELECT N_NAME, AVERAGE(C_ACCTBAL) FROM customer JOIN nation on C_NATIONKEY=N_NATIONKEY GROUP BY N_NAME; for which I get: FAILED: SemanticException [Error 10025]: Line 1:15 Expression not in

Re: Aggregated Expression not in GROUP BY key

2015-07-29 Thread James Pirz
Just a follow-up on the issue. It was really happening because of using AVERAGE() instead of AVG(). Sorry, but the error was mis-leading (It did not tell me that function name is invalid). I had borrowed the query from a benchmark spec, and they had used AVERAGE in their sql statements, and I