Nested Select not working in hive
Nested Select not working in hive FROM ( SELECT upper(name), salary, deductions["service tax"] as service_tax, round(salary * (1 - deductions["service tax"])) as salary_minus_service_taxes FROM employees ) e SELECT e.name, e.salary_minus_service_taxes WHERE e.salary_minus_service_taxes > 70000; When I run the above query I get below error FAILED: SemanticException [Error 10002]: Line 6:10 Invalid column reference 'name' improve forming for code – Osama AbuSitta Jul 1 at 6:13 1 Answer 1 The column should be aliased: SELECT upper(name) as name By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie ...