Execute the following queries on database that you created and give the screenshots of query and the
Fantastic news! We've Found the answer you've been seeking!
Question:
- Execute the following queries on database that you created and give the screenshots of query and the result.
- Name all the borrowers who have a phone number and live in ‘Lahore’ (Note: Address field has data in which Lahore is somewhere in the string. Example ’24 A Khayaban-e-Jinnah Lahore, Pakistan’)
- Show names of all the book which have less than 10 copies in any branch.
- Show branch names with the book names they have along with the number of copies.
- Show borrower names who have borrowed some book named as ‘The Kite Runner’.
- Show borrower names who have borrowed some books from a library branch which is located in ‘Karachi’. (Note: Address field has data in which Lahore is somewhere in the string. Example ’24 A Khayaban-e-Jinnah Lahore, Pakistan’).
- Show book names along with their author names for those books which are published by ‘Rehman Publishers’.
- Show all publisher names who do not have a phone number but they have published a book named ‘Alchemist’.
- For each book that is loaned out from the ‘Iqbal Town branch’ and whose Due_date is today, retrieve the book title, the borrower’s name, and the borrower’s address (Use Date Function)
- Show all the book names which are loaned out and due date is in September.
- Show branch names from which a book has been loaned out by a borrower named ‘Ali Ahsan Khan’.
Note: Use JOIN keyword wherever applicable. Do not Use cross product or Multi Table Select. It will not earn you any marks in that particular query.
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date: