single
Sorting in DESCending order
メニューを表示するにはスワイプしてください
But what if we want to get the highest observation? As you remember, sorting in SQL is realized in ascending order, so the biggest values are on the bottom.
In SQL you can easily sort in reverse (descending) order. To do it use DESC keyword followed or preceded by column name. You can also put column names within the parenthesis of DESC keyword. So, there are two variants of using DESC:
DESC(col_name);col_name DESC;
For example, we can order cars by mileage, but this time in descending order.
123SELECT * FROM audi_cars ORDER BY mileage DESC
Please note, that there is also
ASCkeyword in SQL used for ascending sorting. Since default sorting in SQL is in ascending order, this keyword is rarely used.
スワイプしてコーディングを開始
From the audi_cars table extract all the cars sorted by column tax in descending order.
解答
フィードバックありがとうございます!
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください