Orders Placed on the Same Day

medium
Unit 22 · Joins0/2 to milestone

Find pairs of different orders placed on the same date. Return order_date, first_id and second_id with first_id < second_id, sorted by order_date, first_id, second_id.

Schema

customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)
#self-join#dates2 visible + 1 hidden tests
query.sql · SQLite
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Orders Placed on the Same Day · TechGradify