Skip to content
Advertisement

Query to get correponding new col

Need to get team against team exculing the last x5

SQl query to get above output from a single column

Advertisement

Answer

You can get the combinations using a cross join. ie:

Note: Normally you would use the ID, in your sample it didn’t exist.

DBFiddle demo

EDIT: Sample with Id usage (Id is comparable like an Int):

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement