select id,name,major,mark from table where id='001'
id name major mark
001 peter english 90
001 peter art 85
---What I want is: ----
(if the major distinct count >1, show the data without english)
id name major mark
001 peter art 85
(if the major distinct count =1, just displayed as usual)
id name major mark
002 annie english 77
or
id name major mark
003 ken math 82
I don't want to show English if the major distinct count >1, otherwise just displayed as usual. Any idea on how I do this?
Any help would be appreciated.