|
|
|
|
| Re: Easy query [message #561060 is a reply to message #561056] |
Wed, 18 July 2012 10:41  |
 |
Michel Cadot
Messages: 54165 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
select nbrob, abrsent_erl
from mytable
where (nbrob, id) in (select nbrob, max(id) from mytable group by nbrob)
/
With any SQL question, Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
Regards
Michel
|
|
|
|