Consider this table:
id|text|
–|–|
101|Black|
102|Black|
103|White|
104|White|
105|White|
How one could select all the ids except the min id, but also add the corresponding min value in another column? So the expected result would look like:
not min|text|min id|
–|–|–|
102|Black|101|
104|White|103|
105|White|103|
I’m using sql server 15.