左右の靴が混ざったテーブルがあり、そのうちのいくつかは防水です。
アルファベット順に並べ替えるクエリを作成する必要がありますが、名前が同じ場合は、左右の前に防水列を使用します。
例えば
+-------------------------+------------+------------+
| 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 |
+-------------------------+------------+------------+
それはできますか?