我想从表格中选择结果
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"?