Coba ini:
SELECT image_id
FROM list
WHERE style_id IN (24, 25, 27)
GROUP BY image_id
HAVING COUNT(DISTINCT style_id) = 3
DISTINCT
kata kunci hanya diperlukan jika Anda dapat memiliki nilai duplikat style_id
bidang per image_id
.
Coba ini:
SELECT image_id
FROM list
WHERE style_id IN (24, 25, 27)
GROUP BY image_id
HAVING COUNT(DISTINCT style_id) = 3
DISTINCT
kata kunci hanya diperlukan jika Anda dapat memiliki nilai duplikat style_id
bidang per image_id
.