Playground Checkpoint
Design and build a real schema — no auto-grading, just a real attempt.
The Challenge
GreenMart's tables are real now — built, filled with real data, ready to answer anything. Mike has stopped asking Sarah for a list of rows to read through himself. He wants actual answers: who owes money, how much in total, which day had the most sales.
Open the Playground and write the real queries yourself — six of Mike's actual questions, using everything from INSERT and UPDATE through SELECT, WHERE, ORDER BY, and the aggregate functions.
What Your Schema Needs
- Add a brand-new customer who just signed up — any name, any phone number, a starting BalanceDue of 0.
- List every customer who currently owes money, sorted from the highest balance down to the lowest.
- Count how many customers exist in total, and separately, how many of them actually have a phone number on file.
- Find the total amount owed across every customer, along with the average, highest, and lowest balance due.
- Mike just found out Priya was accidentally overcharged this week — update her balance down to 100 to refund the difference.
- Count how many sales happened on 2026-08-29 — GreenMart's busiest day yet.
Stuck? A Few Hints
- COUNT(*) and COUNT(column) answer two different questions — remember chapter 5's Sana row.
- An UPDATE always needs a WHERE clause pointing at exactly one customer, or every row changes.
- SUM, AVG, MIN, and MAX can all run inside the same SELECT statement — no need for four separate queries.
Ready to Build It?
Opens the Playground, right in your browser — nothing to install.
Before You Move On
Every one of these six answers came from a single table at a time — SELECT, WHERE, ORDER BY, and the aggregate functions, exactly as this Act taught them. The next Act is where GreenMart outgrows a single table for good: a real website means real online orders and customers, and questions that finally need more than one table to answer.
