Question: Write a query to display the patron ID, last name, number of times that patron has ever checked out a book, and the number of

Write a query to display the patron ID, last name, number of times that patron has ever checked out a book, and the number of different books the patron has ever checked out. For example, if a given patron has checked out the same book twice, that would count as two checkouts but only one book. Limit the results to only patrons who have made at least three checkouts. Sort the results in descending order by number of books, then in descending order by number of checkouts, and then in ascending order by patron ID (Figure P7.102).Write a query to display the patron ID, last

PAT_ID PAT_LNAME NUM CHECKOUTS NUM DIFFERENT BOOKS 1161 Koch 3 3 1165 Baldwin 3 3 1181 Horne 3 3 1185 Yang 3 3 1210 Cooley 3 3 1229 Burke 3 3 1160 carter 3 2 1171 Marsh 3 2 1172 Miles 3 2 1207 Ramos 3 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!