Write a query for each order's latest state in the last hour, excluding delivered orders.
Unlock detailed company stats for this questionUpgrade
Given order state transitions with timestamps. States: Created, Confirmed, Reached Merchant, Reached Customer, Delivered. Write a query to fetch all order IDs with their latest state in the last 1 hour, excluding orders that are already delivered. Follow-ups: how would this query behave at scale, and what indexes would you add?
Community answers
No answers contributed by the community yet.
Related questions
Write a SQL query for each bond's highest, average and lowest interest where the average exceeds 3%.Related courses

Course

Course
Course
