question

jorob4 avatar image
jorob4 asked

Help with joining multiple tables relating to dates and total amounts

I'm stuck and don't even know where to start, please help

The question: The manager is interested to know yearly borrowing volume by Gender. Present a table displaying the Gender, Year, Month and The Number of Loans. Sort the results in descending order by Gender, ascending order by Year and ascending order by Month. Show only the rows if the number of loans is less than 25. Hint: (1) Use CheckedOut date to extract the year and month when the book is loaned; (2) Use strftime() function to deal with the year and month.

Relevant tables:

Customer:

CustomerID
LastName
FirstName
Address
Suburb
City
PostalCode
Email
PhoneNumber
Gender
MemberStatus
MemberSince
Major

Loan:

LoanID
CustomerID
InventoryItemID
CheckedOut
DueDate
CheckedIn
Renewals
OverdueFee

datedate-functionsdate-and-time-functionsgender
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.