SQL ยท Lesson 117 of 126
Gym: Dates
One date challenge.
Dates are stored as text, written year, month, day. That's why comparing them works. One quick challenge.

- Dates are text
- Year-month-day
- Comparisons just work
Shipped in December
How many orders from December twenty twenty five still have the status shipped? Pause and try. Here's a solution. Two conditions, the status, and a date on or after the first of December. Five orders are still on their way.
โ๏ธ Exercise: Shipped in December
Orders from Dec 2025 that are still 'shipped'
Show hint
status = 'shipped' AND order_date >= '2025-12-01'
Show solution
solution.sqlsql
SELECT COUNT(*) AS shipped_in_december
FROM orders
WHERE status = 'shipped'
AND order_date >= '2025-12-01';Output
โโโโโโโโโโโโโโโโโโโโโโโ โ shipped_in_december โ โโโโโโโโโโโโโโโโโโโโโโโค โ 5 โ โโโโโโโโโโโโโโโโโโโโโโโ
Summary
The basics gym is done. Next, a workout for grouping and joins.
Key takeaways- Dates compare as text
- Combine with AND
- Basics done
Next up: Practice Gym: Groups and Joins โ the middle of the course