Hi all,

I have a table called ABC, like

name    grp
A             1
B             2
C             4
D             8

I want the output like the name having greatest grp i.e D;

I wrote a query:

select name from ( select MAX(grp) from ABC ) gy ;

but it gives error

FAILED: Error in semantic analysis: Line 1:7 Invalid table alias or column 
reference 'name': (possible column names are: _col0)

Please help and suggest why it is so, and what would be the query;


Thanks & regards
Yogesh Kumar





                                          

Reply via email to