🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.

Project 16: Expired Sessions Cleanup

SQL Architect

Builds on these lessons

Query Task

Objective

DELETE removes rows entirely. Like UPDATE, its WHERE clause is what keeps it from wiping out the whole table — always double-check it before running a DELETE against real data.

You're given a sessions table with columns id, user_id, and expires_at.

Task: delete every session where expires_at is before the current date.

query.sql
DELETE FROM sessions WHERE expires_at < CURRENT_DATE;

* Hint: Correct characters turn green, incorrect ones turn red.

Query Results
🗄️

Execute your query to see results