Code Name Group 1 XYZ 0 2 ABC 0 3 XXX 1 4 XXY 0 5 XAB 1 6 XAA 2 7 AAA 0 8 AXB 0 9 AYY 4 10 ABA 2 11 AWS 6 12 AWD 6What I want was to have the above sorted through a SQL query and the output should be like this:
Code Name Group 1 XYZ 0 3 XXX 1 5 XAB 1 2 ABC 0 6 XAA 2 11 AWS 6 12 AWD 6 10 ABA 2 4 XXY 0 9 AYY 4 7 AAA 0 8 AXB 0If you analyse the above output it is something like
1 3 5 2 6 11 12 10 4 9 7 8Can it be possible with a SQL query?