Sorting Results
Sorting Results
SELECT *
FROM table_name
ORDER BY col_name ASC;
-- can use `ASC`, `DESC`
SELECT column1, column2, column3
FROM table_name
ORDER BY column1, column2 DESC, column3 ASC;
-- ascending is the default sort order
-- can `ORDER BY` multiple conditions
620. Not Boring Movies
/* Write your T-SQL query statement below */
SELECT id, movie, [description], rating
FROM Cinema
WHERE [description] != 'boring' AND id % 2 = 1
ORDER BY rating DESC;