Learn SQL by working at Lion City Bank.
SQLwak is a free, browser-based SQL practice game. You're hired as a Graduate Analyst at a fictional Singapore bank and work through 50+ progressively harder SQL challenges — from basic SELECTs to window functions and CTEs.
🎮 Play now → sqlwak.vercel.app
Instead of dry exercises, every query in SQLwak is a real business problem:
- "The Operations team needs all Central region branches for an upcoming audit."
- "Risk wants customers with credit scores below 600."
- "Finance needs vessels ranked by cargo revenue using window functions."
You're not practicing SQL in a vacuum — you're doing analyst work.
| Tier | What You'll Practice |
|---|---|
| 🟢 Foundational | SELECT, WHERE, ORDER BY, LIMIT |
| 🟡 Intermediate | JOINs, GROUP BY, HAVING, subqueries |
| 🔴 Advanced | CTEs (WITH), multi-table aggregations |
| ⚫ Expert | Window functions (RANK/DENSE_RANK OVER PARTITION BY), UNION ALL, compound CTEs |
Lion City Bank has 9 tables across retail banking and maritime trade finance:
Retail Banking
customers— profiles, segments, credit scoresaccounts— account types, balances, statustransactions— debits, credits, timestampsloans— loan types, amounts, repayment statusbranches— regions, branch typesproducts— banking products
Maritime Trade Finance (Advanced/Expert levels)
vessels— merchant fleet, flag states, vessel typescargo_shipments— voyages across Singapore, Port Klang, Bangkok, Jakarta, Ho Chi Minh Citytrade_finance_facilities— Letters of Credit, Trade Loans, utilisation rates
- Frontend: Next.js 15, TypeScript, Tailwind CSS
- Database: SQLite via WebAssembly (all query execution is client-side — no backend)
- Deployment: Vercel
Open the link, start writing queries. That's it.
npm install
npm run devOpen http://localhost:3000.
Issues and PRs welcome! Ideas for new levels, challenge themes, or schema additions are especially appreciated.
Built for anyone preparing for data analyst, data engineer, or business analyst interviews.