Home > database >  How the SQL table put a column in a list as variables and the same value increases a column column i
How the SQL table put a column in a list as variables and the same value increases a column column i

Time:10-29

Before
Size ratio of order
M UQN4001059 2
M UQN4001059 2
L UQN4001059 3
L UQN4001059 3
L UQN4001059 3
XL UQN4001059 4
XL UQN4001059 4
XL UQN4001059 4
XL UQN4001059 4


After

Size ratio of orders increase a list
M UQN4001059 2 1
2 2 M UQN4001059
L UQN4001059 3 1
L UQN4001059 3 2
L UQN4001059 3 3
XL UQN4001059 4 1
XL UQN4001059 4 2
XL UQN4001059 4 3
4 4 XL UQN4001059

CodePudding user response:

Row_number function, look at,

CodePudding user response:

Know the row_number partition
  • Related