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

Abfrage mit mehreren IN-Klauseln in mehreren Zeilen

select distinct ID from table t1
where (select count(*) from table where ID = t1.ID group by ID) >=2
and (select count(*) from table where Idservice = 5 and ID = t1.ID group by ID) > 0