select a.empno from spark_learner.emp a order by hiredate desc LIMIT 4;
this query is getting below error msg:
FAILED: SemanticException [Error 10004]: Line 1:49 Invalid table alias or column reference ‘hiredate’: (possible column names are: empno)
it seems we HAVE TO select “order by” column. can anyone plz let me know if there is any workaround. I want to use it in a subquery and hence I need only empno in select clause.