Zoom
estion 3:
Write a query to select BookID, Title, Publication Year, GenreID, GenreName corresponding to all books published in the year of 1900 or earlier of the genre named 'Adventure' as follows:
BookID Title
Publication
Year GenreID
GenreName
1
6
The Adventures of Huckleberry Finn 1884
9
Adventure
2
36
Tom Sawyer
1876
9 Adventure
3 56
The Prince and the Pauper
1881
9 Adventure
4
76
Adventures of Tom Sawyer
1876
9
Adventure
5 96
Adventures of Huckleberry Finn
1884
9 Adventure
Picture 3.1
Question 4:
Write a query to display GenreID, GenreName of all distinct genres which have books published after 1980 borrowed in at least one loan. Display the results in ascending order of GenreName as follows:
GenreID GenreName
1
2
Fantasy
2
8
Horror
3
3
Mystery
4
10
Poetry
5
5
Romance
Picture 4.1
Question 5:
Write a query to display MemberID, MemberName, Sex, NumberOfBookCopies corresponding to each female member; where NumberOfBookCopies is the number of distinct book copies borrowed in the year 2020 (based on LoanDate) by the corresponding member. Display the results in descending order of NumberOfBookCopies, then in ascending order of MemberName for rows having the same NumberOfBook Copies. Note that NumberOfBookCopies must be 0 if the member did not borrow any book in 2020.
+ 100%
Close