SQL code copied to buffer
RU PT FR
Task 1:

Disc rental and return statistics

Write a query that returns data about the daily issuance and return of disks during July 2005. The resulting table should contain the following columns:
date - date,
rented_at_store_1 - the number of discs issued at the first rental point,
returned_at_store_1 - the number of disks returned at the first rental point,
rented_at_store_2 - the number of discs issued at the second rental point,
returned_at_store_2 - the number of disks returned at the second rental point,
total_rented - total number of leases issued,
total_returned - total number of returned disks
Dates on which there were no transactions should also appear in the resulting table with zero values in all fields.

Use MySQL syntax to write your answer. Descriptions of tables are provided in the right pane.

Write your request in the field below and click the "Check it!" button.
Get hint
Copy code Clear editor

Hi! Could we please enable some services and cookies to improve your experience and our website?

Privacy & Cookie Policy.