I recently had an iterview. I was asked a complex sql question. I was not able to answer it.
Q: There are 8 teams in football match.
case1: Each team has to play with one another but only once.
Case2: Each team has to play with another team twice.
Could you please tell me the SQl query for both the cases?