Nested Select not working in hive

Multi tool use
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'
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 policy, and that your continued use of the website is subject to these policies.
improve forming for code
– Osama AbuSitta
Jul 1 at 6:13