I have a game where we store user results in a table, similar to this structure:
game_id, user_id, score, ....
Now our service team would like to find all game_ids where user A and user B played together. Meaning I want to SELECT and GROUP BY game_ids WHERE one entry has user_id = A and the other entry has user_id = B.
What would be a performant way to query this in MySQL?