SQL problem [message #18716] |
Tue, 12 February 2002 03:12 |
Kannan
Messages: 29 Registered: September 2000
|
Junior Member |
|
|
HI
I have a table taxes with three columns
l_code varchar2(5)
e_code varchar2(5) and
duty number(9,2)
Say these are sample records in the table
l_code e_code duty
AA001 XX001 1000
AA001 XX002 2000
AA002 YY001 500
AA002 YY002 3000
AA003 ZZ001 4000
AA003 ZZ002 1500
I want the output to be:
AA001 XX002 2000
AA002 YY002 3000
AA003 ZZ001 4000
The maximum duty and its e_code under every l_code.
We had done it using a view. But how to do it in SQL query itself.
Thanks
Kannan
|
|
|
|