Reputation: 5525
I have a table with following structure
I need to identify all unique 1st level ids which have more than 1 0th level id In this example , query should return 200, 400
How can I acheive that?
Upvotes: 0
Views: 351
Reputation: 4055
select 1st_level_id
from your_table
group by 1st_level_id
having count(distinct 0th_level_id) > 1
Upvotes: 1