🎯 Few days left this month Support SQLTest.online and help us keep SQL practice free for everyone. Donate today →
SQL code copied to buffer
Task 122:

Client Rentals by Time of Day

MySQL
Count the number of films rented in each of day intervals: 
Morning 08:00-12:59, Afternoon 13:00-17:59, Evening 18:00-22:59 and Night 23:00-07:59.
Output the resulting table from two columns time_of_day and rentals_count sorted by rentals count in descending order
Expected result Columns: 2 · Rows: 4
time_of_day rentals_count

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

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