I have the following table, and I want to only get the rows which have the same foreign keys.
id foreign_id
1 100 a
2 200 a
3 300 b
4 400 c
5 500 c
6 600 d
to this:
id foreign_id
1 100 a
2 200 a
4 400 c
5 500 c