Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Завдання: Сортувати країни за регіоном і столицею | Сортування отриманих даних
Вступ до SQL

book
Завдання: Сортувати країни за регіоном і столицею

Here is the country table we are working with:

Завдання

Swipe to start coding

Write an SQL query to retrieve three columns from the country table using the SELECT statement, namely: name, region, and capital (please retrieve these columns in this order). Sort the result by two of them - first by region in descending order, then by capital, also in descending order.

Рішення

SELECT name, region,capital
FROM country
ORDER BY region DESC, capital DESC;
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 6

Query ResultQuery Result
No query executed yet...

Запитати АІ

expand
ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

We use cookies to make your experience better!
some-alt