Question: Write and SQL query to list the patrons (patron_id, last_name, first_name, DOB) whose data were added/modified today (use SYSDATE as todays date). The first name
Write and SQL query to list the patrons (patron_id, last_name, first_name, DOB) whose data were added/modified today (use SYSDATE as todays date). The first name and last name should have the following format: Upper case Initial, period, comma, and Last name in a mixed case. Use the ISO standard for DOB (YYYY-MM-DD). Sort the results by last name. Print the query and the results.
2. The query results should have at least the two new patrons added in (a).
3. Write SQL to list all patrons with their ids and age in years (rounded up). Age is calculated based on the server date/time. Sort the results by age in an ascending order.
4. Write SQL to list all patrons and their number of transactions for each transaction type. Include all patrons even if they do not have transactions.
5. Write SQL to list the books with the word database or data base or databases in their title. Make your search case insensitive. Print the authors last name (mixed case) and the title. Sort the results by the rating.
6. Write a join command to display all the patrons with at least one book issued to them.
7. Write SQL to list all the books (book ids and first 10 characters of the title) and their total number of transactions in 2020. Include all books even ifthey have no transactions (count should be 0). Sort the results by the most popular book (the book with the most transactions).
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
