Skip to content

Instantly share code, notes, and snippets.

@adrimolano
Created May 9, 2016 22:25
Show Gist options
  • Save adrimolano/33c5f324682a95a3785a9e9f690a8b47 to your computer and use it in GitHub Desktop.
Save adrimolano/33c5f324682a95a3785a9e9f690a8b47 to your computer and use it in GitHub Desktop.
exercise 11_sql
SELECT count(editions.isbn) AS "number of books", authors.id, concat_ws (' ',authors.first_name , authors.last_name) AS "full name"
FROM editions
join books on editions.book_id = books.id
join authors on books.author_id = authors.id
GROUP by authors.id
ORDER BY "number of books" DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment