Q:

SQL Get unique value of group id where member id is one or more

I need some help with some code
I have a database table called "stuff" and I have this info:
+------+-------------+---------------------+
| id   | member_id   |     group_id        |
+------+-------------+---------------------+
| 1    |      11     |         aa          |
+------+-------------+---------------------+
| 2    |      11     |         bb          |
+------+-------------+---------------------+
| 3    |      22     |         bb          |
+------+-------------+---------------------+
| 4    |      11     |         cc          |
+------+-------------+---------------------+
| 5    |      22     |         cc          |
+------+-------------+---------------------+
| 6    |      33     |         cc          |
+------+-------------+---------------------+

what I need:
If I search for group_id when member_id = 11 the result will be aa
If I search for group_id when member_id = 11 AND member_id = 22 the result will be bb
If I search for group_id when member_id = 11 AND member_id = 22 AND member_id = 33 the result will be cc

A:

SELECT  group_id
FROM    stuff
GROUP   BY group_id
HAVING  SUM(member_id = 11) = 1
        AND SUM(member_id = 22) = 1
        AND COUNT(*) = 2

SQLFiddle Demo

another variation,
SELECT  group_id
FROM    stuff a
WHERE   member_id IN (11,22,33)                 -- <<== list of member_id
        AND
        EXISTS
        (
          SELECT group_id
          FROM stuff b
          WHERE a.group_id = b.group_id
          GROUP BY group_id
          HAVING COUNT(*) = 3                   -- <<== number of member_id
        )
GROUP   BY group_id
HAVING  COUNT(*) = 3                            -- <<== number of member_id

SQLFiddle Demo

