Question
Assume that a Consumer item lease Company which leases various household items to its clients for their use for a specific period of time, maintains
Assume that a Consumer item lease Company which leases various household items to its clients for their use for a specific period of time, maintains the following tables: Clients (clientID, name, address, contact Phone)
Itemlist (itemID, itemName, itemCost, purchase Date )
Leaselist (clientID, transactionNO, itemID, startDate, returnDate, amountTObeCharged)
Note: A client may lease an item many times. Amount to be charged is calculated as per a fixed rate multiplied by number of days item is leased. All items have unique itemID. However, two or more items may have same name.
Write the following SQL queries:
a. Find all the client names that have not got any item leased during the last month and no leased item is pending with them.
b. Find the list of all the items that were leased or returned last month.
c. Find the names of all those clients who have given the business to the company in the decreasing order of total amount paid by a client.
d. List the client's details and the items leased to them at present.
e. Find the client who has been leased at least two items.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started