/* 1. Write a query that displays the book title, cost, and year of publications for every book in the system. Sort the results by book title. */ SELECT BOOK_TITLE, BOOK_COST, BOOK_YEAR FROM BOOK ORDER BY BOOK_TITLE; /* 2. Write a query that displays the first and last name of every patron and last name of every patron? */ SELECT PAT_FNAME, PAT_LNAME FROM PATRON ORDER BY UPPER(PAT_LNAME), UPPER(PAT_FNAME); /* 3. Write a query that to display the book number, book title, and subject for every book sorted by book number? */ SELECT BOOK_NUM, BOOK_TITLE AS TITLE, BOOK_SUBJECT AS "Subject of Book" FROM BOOK ORDER BY BOOK_NUM; /*4. Write a query to display the checkout number, book number, and checkout dae of all books checked out before April 5, 2017 sorted by checkout number.*/ SELECT CHECK_NUM, BOOK_NUM, CHECK_OUT_DATE FROM CHECKOUT WHERE CHECK_OUT_DATE < '2017-04-05' ORDER BY CHECK_NUM; /*5. Write a query to display the book number, title, subject, and costs for all books that are on the subjects of “Middleware’ of ”Cloud” ad that costs more than $70, sort by book number. */ SELECT BOOK_NUM, BOOK_TITLE, BOOK_YEAR FROM BOOK WHERE BOOK_YEAR > 2015 AND BOOK_SUBJECT = 'Programming' ORDER BY BOOK_NUM;