- There is a book called 'The Lost Tribe'.
- There is a library branch called 'Sharpstown' and one called 'Central'.
- There are at least 20 books in the BOOK table.
- There are at least 10 authors in the BOOK_AUTHORS table.
- Each library branch has at least 10 book titles, and at least two copies of each of those titles.
- There are at least 8 borrowers in the BORROWER table, and at least 2 of those borrowers have more than 5 books loaned to them.
- There are at least 4 branches in the LIBRARY_BRANCH table.
- There are at least 50 loans in the BOOK_LOANS table.
- There must be at least one book written by 'Stephen King'
SELECT No_Of_Copies FROM BOOK_COPIES WHERE BookId = 1 and BranchId = 1
For library branch, you could use
SELECT No_Of_Copies FROM BOOK_COPIES WHERE BookId = 1 AND BranchId IN (SELECT BranchId FROM library_branch WHERE BranchName = 'Sharpstown');