Delivery time: Екатеринбург, 4 ≤ km < 8, since Mar 2025
Level: Junior50 XP
Instructions
Among the delivered orders (status = 'delivered') of couriers from the city 'Екатеринбург' (couriers.city) with distance_km at least 4 and strictly less than 8, created on or after March 1, 2025, compute by vehicle type (couriers.vehicle): deliveries_cnt, the number of deliveries, and avg_minutes, the average time from created_at to delivered_at in minutes, rounded to 1 decimal place. Select vehicle, deliveries_cnt, avg_minutes. Row order does not matter.
Hints
Each next one is more detailed and costs more
Query
Result
Click Run to see the query result, or Check to submit your solution.
Dataset schema
Exactly oneZero or oneZero or more
Table relationships
- N:1Many-to-one
deliveries.→restaurant_id restaurants.id - N:1Many-to-one
deliveries.→customer_id customers.id - N:1Many-to-one
deliveries.→courier_id couriers.id
Table data
PostgreSQL
Select a table in the diagram or list to view its rows.