Back to problems

Find daily first-order merchants with SQL

SQL · Amazon · Medium

We have an orders table that records every order placed on a platform. Each row contains the order id, the merchant who fulfilled it, the user who placed it, the UTC timestamp when the order was created, and its current status. Task 1: Daily first completed orders across all merchants Write a single SQL query that uses window functions (not per-row correlated subqueries) to return, for each calendar date in UTC, every merchant whose order was the first completed order of…

Checking your access…