The table has single row with unique ID, duplicated rows and multiple different rows with the same ID.
I need to pick up those rows which have different values with the same ID
ID Major Major_ID
1234 chemi 1111
1234 chemi 1111
673 biology 2222
673 phylo 3333
2480 comput 4444
2480 busine 5555
243 accout 6666
492 finance 7777
4812 engine 8888
SQLFiddle with sample data: http://www.sqlfiddle.com/
The expected result:
ID Majoy Major_ID
673 biology 2222
673 phylo 3333
2480 comput 4444
2480 busine 5555