A dark-first SQL & Data Analytics interview prep platform that runs real PostgreSQL in your browser, with an AI tutor that teaches instead of spoiling.
Features · How It Works · Tech Stack · Author
Most interview-prep tools make you choose: realistic questions or a real database or useful feedback. QueryLab combines all three.
| Typical SQL prep sites | QueryLab | |
|---|---|---|
| Real PostgreSQL syntax (windows, CTEs, intervals) | Partial | ✅ Full |
| Queries run in an isolated sandbox | Server-side | ✅ In your browser (WASM) |
| Question source transparency | Rarely | ✅ Every question labeled A / B / C |
| Hints that don't spoil the answer | ❌ | ✅ 3-tier progressive hints |
| Duplicate-free AI-generated questions | ❌ | ✅ Similarity-checked |
| Timed mock interview + debrief | Paid add-on | ✅ Built in |
Every challenge runs in an ephemeral in-memory Postgres compiled to WebAssembly via @electric-sql/pglite. Nothing touches a production database.
- Window functions:
ROW_NUMBER,RANK,DENSE_RANK,LAG,LEAD,PERCENTILE_CONT - CTEs, correlated subqueries, interval arithmetic, conditional aggregation
- Column-by-column result diff against the expected output
EXPLAIN (VERBOSE, COSTS)plan viewer
Every question carries a visible provenance badge:
| Badge | Category | Meaning |
|---|---|---|
| 🟢 A | Verified Real | Sourced from public interview reports, company tech blogs, or documented experiences, with a source URL |
| 🟡 B | Community Reported | Candidate-reported from recent interview loops, schema-verified |
| 🔵 C | AI Generated | Synthesized by Groq, verified in the PGlite sandbox, and duplicate-checked |
|
🪄 AI Question Generator Creates novel scenarios with schema, seed data, and a reference solution, then auto-verifies them in PGlite before publishing. 🛡️ Duplicate Prevention Engine Jaccard token overlap + normalized Levenshtein distance + semantic scoring. Anything above 0.70 similarity is rejected. 🔍 AI Solution Explainer
Walks through logical execution order and suggests indexing strategies:
|
💡 3-Tier Progressive Hints
🎙️ Timed Mock Interviewer Simulates a live screening round, then produces a debrief with a readiness score and weak-concept diagnosis. |
| Track | What you'll cover |
|---|---|
| 🗄️ SQL | Fundamentals · Aggregations · Joins · Subqueries & CTEs · Window Functions · Analytical SQL (cohort retention, rolling 7-day metrics) |
| 🐍 Python | Pandas DataFrames · boolean indexing · missing values · group-by · EDA |
| 📊 Statistics | Summary stats · distributions · A/B testing · p-values · hypothesis tests · confidence intervals |
| 📈 Data Analytics | SaaS & consumer KPIs: LTV, CAC, churn, ARPU, conversion funnels |
- 16-week GitHub-style activity heatmap
- Recharts performance telemetry
- Global leaderboard with XP podium
- Unlockable badges, bookmarks, and
Cmd+Kglobal search - One-click demo profiles so you can explore instantly
Solving a question
┌──────────────────────┐ ┌──────────────────────┐
│ Write SQL │ ──▶ │ Run in PGlite │
│ (Monaco Editor) │ │ (in-browser Postgres)│
└──────────────────────┘ └──────────┬───────────┘
▲ │
│ Matches expected output?
│ │ │
│ NO YES
│ ▼ ▼
│ ┌───────────────────┐ ┌─────────────────────────┐
│ │ Column-level diff │ │ XP + heatmap + badges │
│ └─────────┬─────────┘ │ + analytics/leaderboard │
│ ▼ └─────────────────────────┘
│ ┌───────────────────┐
└─────────── │ 3-tier AI hints │
│ (Groq, server) │
└───────────────────┘
Publishing an AI-generated question
Groq generates question
│
▼
Run reference solution in PGlite sandbox
│
▼
Compare against existing questions
(Jaccard + Levenshtein + semantic score)
│
┌──────┴───────────────┐
▼ ▼
similarity > 0.70 similarity <= 0.70
REJECTED (duplicate) PUBLISHED as Category C
| Layer | Technology |
|---|---|
| Frontend | Next.js (App Router) · React · TypeScript (strict) · Tailwind CSS |
| UI & Motion | Monaco Editor · Framer Motion · Lucide React · Recharts · canvas-confetti |
| SQL Engine | @electric-sql/pglite (WebAssembly Postgres by ElectricSQL) |
| Database / ORM | Neon Serverless PostgreSQL · Prisma |
| AI | Groq API · Llama 3.3 70B Versatile (groq-sdk) |
| Cache / Rate limit | Upstash Redis (automatic in-memory fallback) |
| Auth | Better Auth / session tokens via jose · PBKDF2 hashing · demo profiles |
A dark-first interface inspired by Linear, Vercel, and Stripe.
| Token | Hex | Preview |
|---|---|---|
| Base background | #0B0D10 |
|
| Secondary background | #11151B |
|
| Surface | #171C24 |
|
| Elevated surface | #1D2430 |
|
| Border | #29313D |
|
| Primary accent (Lime) | #A3E635 |
|
| Secondary accent (Indigo) | #7C9EFF |
Typography: Geist / Inter for UI, Geist Mono for SQL.
Designed and built by Harsh Shirke
MIT License. Built for production interview preparation.