Question · SQL and MySQL course · Module 2: Querying data (SELECT)

Combining an alias with sorting

What will the query "SELECT tytul AS Tytul, cena AS Cena FROM ksiazki ORDER BY cena DESC LIMIT 3;" do?

Answer options

  • It shows all books sorted ascending
  • It permanently changes the column names in the table
  • It shows the 3 cheapest books
  • It shows the 3 most expensive books with the headers Tytul and Cena
Show the answer

Correct answer:

  • It shows the 3 most expensive books with the headers Tytul and Cena