I have data existing in a Oracle with 2 columns.
Name ID
Default 123
Arod 234
Default 589
Green 589
I would need to write a query based on -
1) When multiple records are existing for each ID, I would need to extract the record that's not default. In this case I need to extract the record with Name "Green" for ID 589. Max 2 records will exists for each ID and one will be default
2) When single record exists for each ID, I just need to populate the name associated with that ID.
Any pointers will be greatly appreciated.