我有一张桌子,里面放着左右鞋的混合物,其中一些是防水的。
我需要编写一个查询以按字母顺序对它们进行排序,但是 - 当名称相同时 - 使用左/右前面的防水列。
例如
+-------------------------+------------+------------+
| Shoe name | Waterproof | Left/Right |
+-------------------------+------------+------------+
| boot | 0 | left |
| sandal | 0 | left |
| shoe | 1 | left |
| boot | 1 | left |
| boot | 0 | right |
| boot | 1 | right |
| sandal | 0 | right |
| shoe | 1 | right |
+-------------------------+------------+------------+
应该这样排序...
+-------------------------+------------+------------+
| Shoe name | Waterproof | Left/Right |
+-------------------------+------------+------------+
| boot | 0 | left |
| boot | 0 | right |
| boot | 1 | left |
| boot | 1 | right |
| sandal | 0 | left |
| sandal | 0 | right |
| shoe | 1 | left |
| shoe | 1 | right |
+-------------------------+------------+------------+
可以做到吗?