How to check group for containing certain elements in SQL?

Posted by noxvile on Stack Overflow See other posts from Stack Overflow or by noxvile
Published on 2010-04-29T09:57:30Z Indexed on 2010/04/29 10:07 UTC
Read the original article Hit count: 111

Filed under:

I have a simple table:

id num

1 7
1 5
1 4

2 5
2 4
2 7

3 4
3 7

How to select ids having num 5 as well as 7 and 4

For this example ids: 2, 3

© Stack Overflow or respective owner

Related posts about sql