有没有更好的方法来执行这个查询而不使用嵌套子查询?
-- select all races for jockeys which have multiple regions
select distinct r.id, r.description
from jockeys_races jra inner join races r on r.id = jra.race_id
where jra.jockey_id in (
select jre.jockey_id
from jockeys_regions jre
group by jre.jockey_id
having count(*) > 1
);
骑师可以属于多个地区。骑师可以参加多个比赛。