Write a query to display the book number title and number of
Write a query to display the book number, title, and number of times each book has been checked out. Include books that have never been checked out. Sort the results in descending order by the number times checked out, then by title. (Figure P8.56)
Chapter 8 problem 56. Problem taken from Database Systems: Design, Implementation, and Management, 12th edition, by Carlos Coronel and Steven Morris
Solution
select book number,title from books table;
select books borrowed from books table;
select books not borrowed from books table;
select from books table order by borrowed desc;
