Easy SQL — Ordering

Your task is to sort the information in the provided table ‘companies’ by number of employees (high to low). Returned table should be in the same format as provided: companies table schema id ceo motto employees Solution should use pure SQL. Ruby is only used in test cases.

Перевод задания:

Ваша задача — отсортировать информацию в предоставленной таблице «компании» по количеству сотрудников (по убыванию). Возвращенная таблица должна быть в том же формате, что и предоставленная:

companies table schema
id
ceo
motto
employees

Решение должно использовать чистый SQL.

Выберем из таблицы нужные поля.

  select id,ceo,motto,employees from companies

и добавим сортировку по убыванию с помощью команды ORDER

select id,ceo,motto,employees from companies
order by employees desc