Keep SQLtest alive: Help cover this month's $100 server costs to keep all lessons and the SQL playground online. Support the project →
SQL code copied to buffer
Task 28:

Monthly Billing Report

MySQL
Create a monthly billing report for customer Dorothy Taylor for the month of August 2005. The report should include a table with the following columns:

- title - rented film names,
- rental_date, return_date, payment_date - relevant dates,
- rental_rate - film's rental rate,
- lateness_penalty - difference between rental rate and paid amount,
- amount - paid amount.

Sort the table by payment_date. Add a summary row to the report with Total in the title column, nulls in all data columns, and sums in other columns.
Expected result Columns: 7 · Rows: 9
title rental_date return_date payment_date rental_rate lateness_penalty amount

Sample rows open after wrong checks: 0 of 3

Write your query below and click "Check it!". Tables are described in the right pane.

The query result will appear here. Ctrl+Enter - Run query

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

Privacy & Cookie Policy.