Zoom
Question 7:
Write a query to display GenreID, GenreName, NumberOfMaleMembers,NumberOfFemale Members, corresponding to each book genre, where NumberOfMaleMembers and NumberOfFemale Members are respectively the number of distinct male members and female members who have borrowed in the year 2020 (based on LoanDate) books belonging to each book genre. Note that all book genres must be displayed in the results as in the following figure.
GenreID
GenreName
NumberOfMale Members
NumberOfFemale Members
1
1
Science Fiction
6
2
2
2
Fantasy
4
1
3
3
Mystery
3
2
4
4
Thriller
0
0
5
5
Romance
9
7
6 6
Historical Fiction 1
4
7
7
Biography
2
1
8
8
Horror
2
1
9
9
Adventure
4
3
10 10
Poetry
4
2
Picture 7.1
Question 8:
Create a stored procedure named insertAuthor with @authorID int, @author Name nvarchar(100), @country nvarchar(100), @sex nvarchar(10), @yearOfBirth int as input
+ 112%
Close