id | order_id | item_id
1 | 10 | 101
2 | 10 | 102
3 | 11 | 140
4 | 12 | 131
5 | 13 | 145
SELECT DISTINCT order_id FROM TableName WHERE item_id = 101 OR item_id = 102
к которому относятся оба item
SELECT DISTINCT TableName_101.order_id
FROM TableName AS TableName_101
INNER JOIN TableName AS TableName_102 ON TableName_101.order_id = TableName_102.order_id
WHERE (TableName_102.item_id = 102) AND (TableName_101.item_id = 101)