Mysql
 sql >> Base de données >  >> RDS >> Mysql

Requête avec plusieurs clauses IN sur plusieurs lignes

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