Assuming that group
and model
are unique for every owner
SELECT a.owner
FROM tableName a
WHERE a.[group] = 'shapes' AND
a.model IN ('circle','star')
GROUP BY a.owner
HAVING COUNT(*) = 2
otherwise, you need to uniquely count the number of model
SELECT a.owner
FROM tableName a
WHERE a.[group] = 'shapes' AND
a.model IN ('circle','star')
GROUP BY a.owner
HAVING COUNT(DISTINCT a.model) = 2