SQL Fundamentals · SQL problem

Orders Placed in January

A free sql problem from the SELECT, WHERE & JOIN skill. Read it here, then solve it in the app.

  • Easy
  • SQL problem
  • Free

The problem

Finance is closing January 2026 and needs every order placed that month.

Return one row per order placed in January 2026 (UTC - the session's time zone), with:

columnmeaning
order_idthe order's id
customer_namewho placed it - NULL for a guest checkout
totalthe order total

Every status counts. Sort by ordered_at, and by order_id when two orders share a timestamp.

Constraints

ordered_at is a timestamptz - a moment in time, to the second, not just a date.

How it's graded

  • Your SQL runs on PostgreSQL 18. Run compares your rows with the expected rows on the sample data; Submit runs it against hidden datasets built to catch the classic mistakes.
  • Stuck? Hints come in four steps, from a nudge to a code skeleton, each costing part of the points.

More problems in SELECT, WHERE & JOIN

Write the query Orders Placed in January free

No card needed. Lessons, practice questions and easy problems are free forever.

Free plan, no card · 7-day Pro trial · Cancel anytime