I have data columns:
id name type number
1 n1 t1 num1
2 n2 t1 num2
3 n3 t1 num3
4 n10 t1 num10
5 n4 t2 num4
6 n5 t2 num5
7 n6 t2 num6
8 n7 t3 num7
9 n8 t3 num8
10 n9 t3 num9
Which select I shuld run to get this result?
id name type number
1 n1 t1 num1
5 n4 t2 num4
8 n7 t3 num7
2 n2 t1 num2
6 n5 t2 num5
9 n8 t3 num8
3 n3 t1 num3
7 n6 t2 num6
10 n9 t3 num9
4 n10 t1 num10
I guess it could be right way to do it using procedure but is it possible to sort it in the simple query?
Update1:
name, type and number columns are independent. And I need to sort it by type as you can see in the result example.
SQL FIDDLE HERE