user_id | group_id
------------------
5 3
6 1
6 3
7 1
7 2
8 2
My join table looks like this. The query I'm trying to accomplish is finding if two user_ids have a matching group_id. In raw sql I would flatten the table. However, I'm not sure how to query the table and get the results I want with Sequelize.
