how do you return only groups that contain a specific value in mysql?

You can use group by and having:

select foo
from mytable
group by foo
having min(bar) = max(bar) and min(bar) = 10;

if 10 is the minimum value:

having max(bar) = 10

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top