RienSQL
TASK #209 · Easy · Glovo

Delivery Peak Hours

Your brief
The orders table stores Glovo orders. Delivered orders have status = 'delivered'.

Write a query that returns order_hour (the hour of the day from created_at, 0 to 23) and delivered_orders (the number of delivered orders created in that hour, across all dates). Keep only the hours with at least 6 such orders. Sort by delivered_orders descending and, on ties, by order_hour ascending.
Expected columnsorder_hour delivered_ordersGlovo
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
storesstore_id, store_name, category, city, x, y
courierscourier_id, courier_name, city, vehicle
ordersorder_id, store_id, courier_id, status, created_at, promised_minutes, delivered_at, courier_start_x, courier_start_y, dropoff_x, dropoff_y, order_total