Mysql
 sql >> Database >  >> RDS >> Mysql

Filtra utilizzando una tabella MySQL molti-a-molti

SELECT
  personID
FROM
  people_to_sports
WHERE
  sportID IN (1, 2)
GROUP BY
  personID
HAVING
  COUNT(*) = 2