Q1.sql

This preview shows page 1 out of 1 page.

select ll.library_name, count(bb.book_id) as number_of_books from libraries ll INNER JOIN books bb ON ll.library_id = bb.lib_location_id inner join lending_data ld on ld.book_id=bb.book_id Group by ll.library_name; select * from borrowers; select * from lending_data; select * from books; select * from libraries; insert into libraries (library_name,library_address) values ('Library,Georgia','Books Street, GA'); insert into lending_data (borrower_id,book_id,lending_start_date,lending_due_date) values (2,1,'2018-11- 07','2018-12-07'); insert into lending_data (borrower_id,book_id,lending_start_date,lending_due_date) values (2,4,'2018-11-
Image of page 1
You've reached the end of this preview.
  • Summer '19
  • Public library, 1107, 07, John King, libraries ll INNER JOIN

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern