Ordering
It is often useful to order query results.
List book titles, year of publication, and author name in order
of publication date.
select b.title, b.year, a.name
from book b left join author a using (author_id)
order by b.year
title |
year |
name |
A Woman in Berlin | 1959 | NULL |
Mother Night | 1962 | Kurt Vonnegut Jr. |
Cat's Cradle | 1963 | Kurt Vonnegut Jr. |
Slaughterhouse Five | 1969 | Kurt Vonnegut Jr. |
A Confederacy of Dunces | 1980 | John Kennedy Toole |
A Handmaid's Tale | 1985 | Margaret Atwood |
Diary of an Oxygen Thief | 2006 | NULL |
Playing With Matches | 2018 | Hannah Orenstein |
Love at First Like | 2019 | Hannah Orenstein |
The Testaments | 2019 | Margaret Atwood |
Head Over Heels | 2020 | Hannah Orenstein |
Beowulf | NULL | NULL |
|