テーブルから結果を選択したい
USER HOBBY
John Sport
Ann Piano
Lee Reading
Ann Sport
Lee Piano
そして、共通の趣味が複数ある人を探したいです。パフォーマンスが優れているクエリはどれですか。
select user from table where hobby = "sport"
intersect
select user from table where hobby = "piano"
または
select user from table where user in (select user from table where hobby = "piano") and where hobby = "sport"?