Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Filtern Sie mit einer Many-to-Many-Tabelle MySQL

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