50 Users with a record format
- Id,
- Name,
- Group_Id
And Groups
1,
2,
3
Are to be inserted into a pairs table in the format
- Id,
- Pair_1,
- Pair_2
Note
Users belongs to different groups.
Users from group 2 cannot pair with each other and users from group 3 can also not pair with each other, duplicates must also be avoided.
How do i go about this in Sql. Am a novice.