Single and multiple table queries

Part A: Single and multiple table queries

Please answer all 6 questions.

For five questions you have to provide the following

· SQL statement (3 of the marks)

For question 4 you have to provide the following:

· Written question, SQL statement to answer the question (3 of the marks)

1. List in ascending order the Last Names of all borrowers with Card Number less than 150.

2. What are the records of those loans between 3 June 2014 and 8 Mar 2018?

· The output should include the name of the cardholder, and title of the book.

· List in ascending order by last name and first name

3. Find the total numbers of loans with last name beginning with D until E; include last name beginning with Q as well as Z also.

4. Create your own question based on the library Database and with a SQL Statement to answer this.

5. Find all borrowers for a loan that have the Date-in before 15-March-15 and the Card number between 100 and 300 in Karama or Darwin.

6. Find the number of loans, which have been made from each branch?

· Note all branches need to be included even those with no loans