I have two tables:
Table "A":
+----------+
| item_id |
+----------+
| 10 |
| 20 |
| 30 |
| 40 |
+----------+
and table "B":
+----------+-------------+
| item_id | user_id |
+----------+-------------+
| 10 | 1 |
| 10 | 2 |
| 20 | 1 |
| 30 | 2 |
+----------+-------------+
the field "item_id" is a common field.
If i wish to select all rows from table A where both users 1 and 2 exist (but not the rows where only one of the two exists), how might I got about building this query? (I'm looking to have one row in the result where item_id is 10).