SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ
Next-Gen Visual SQL Learning

Don't just write SQL.
Watch it work.

Type a query and see your table filter, shrink, reorder and transform in real time. Master SQL by seeing every clause in action.

No signup required · Runs 100% in browser · Free & Open
Live Keystroke Simulation
FROM employees → WHERE salary > 70k → SELECT name, salary → ORDER BY DESC → LIMIT 3
name department salary
Reported interview patterns from top engineering teams
Google
Amazon
Microsoft
Meta
Uber
Netflix
Walmart
Flipkart
Swiggy
Zomato
Infosys
TCS
Apple
Stripe
Salesforce
Lyft
Snap
PayPal
Square
Spotify
Shopify
Disney
Airbnb
Booking.com
Expedia
DoorDash
Instacart
Amplitude
Oracle
Etsy
LinkedIn
Workday
Block
Mailchimp
Dropbox
Best Buy
Target
Duolingo
UnitedHealth
Google
Amazon
Microsoft
Meta
Uber
Netflix
Walmart
Flipkart
Swiggy
Zomato
Infosys
TCS
Apple
Stripe
Salesforce
Lyft
Snap
PayPal
Square
Spotify
Shopify
Disney
Airbnb
Booking.com
Expedia
DoorDash
Instacart
Amplitude
Oracle
Etsy
LinkedIn
Workday
Block
Mailchimp
Dropbox
Best Buy
Target
Duolingo
UnitedHealth
127
Practice questions
39
Companies represented
2
SQL dialects: MySQL & PostgreSQL
7
Study plans

Question of the day

Amazon: Above City Average Spend

Find customers whose total cumulative purchase spend exceeds the average customer spend in their respective city.

Medium Amazon ~8 min
Solve today's question A new question every day
Practice Library

Top Asked SQL Interview Questions

Practice real questions reported by candidates, organized by company and difficulty.

Showing 127 questions
A
Amazon 31 questions · 5 Hard
+
Medium Second Highest Salary
Common →
Easy Find Duplicate Emails
Common →
Hard Department Top Three Salaries
Common →
Medium Nth Highest Salary
Common →
Hard Products Never Purchased Together
Common →
Easy Amazon: Category Revenue Report
Occasional →
Easy Amazon: Late Shipments Audit
Occasional →
Easy Amazon: Repeat Buyers
Common →
Easy Amazon: Inactive Catalog Products
Occasional →
Medium Amazon: Repeat Purchase Rate
Common →
Medium Amazon: Monthly Category Revenue Pivot
Occasional →
Medium Amazon: Marketplace Seller Return Rate
Occasional →
Medium Amazon: Above City Average Spend
Occasional →
Medium Amazon: First Order Details
Occasional →
Medium Amazon: Days Between Repeat Orders
Occasional →
Medium Amazon: Best-Selling Products per Category
Occasional →
Medium Amazon: Customer Spend Quartiles
Occasional →
Hard Amazon: Frequently Bought Together
Occasional →
Hard Amazon: Prime Monthly Churn Rate
Occasional →
Hard Amazon: Monthly Cohort Retention
Common →
Medium Frequently Bought Together Pairs
Common →
Easy Inactive 2024 Signups
Common →
Medium Quarterly Revenue Pivot by Category
Common →
Easy Second Highest Delivery Fee
Common →
Medium Ordered Purchase Funnel
Common →
Medium Camera Buyers Without Memory Cards
Common →
Medium Average Days Between Orders
Common →
Medium Items Priced Above Category Average
Common →
Medium Products Driving 80% of Revenue
Common →
Easy Units Sold per Department
Common →
Medium Weekly GMV and Repeat Buyers
Common →
BKNG
Booking.com 1 question
+
AMPL
Amplitude 1 question · 1 Hard
+
MC
Mailchimp 1 question
+
DUO
Duolingo 1 question · 1 Hard
+
Core Capabilities

Everything you need to actually understand SQL

No black boxes or static outputs. Watch the relational database engine compute every clause step-by-step.

Live Result Visualizer

As you type in the editor, the database table updates live (debounced at ~120ms). You immediately see how every keyword mutates the underlying rows and columns.

SELECT * FROM employees → 12 rows loaded in 4ms

Filter Animation (WHERE)

Non-matching rows turn red, show strikethrough, and collapse smoothly. Matching rows pulse with a subtle green glow.

Passed: 4 Eliminated: 8

Column Projection & Math

Unselected columns dim and slide away. Aliases animate header renames, and expressions slide in with a computed tag.

FLIP Sort Reordering

Rows physically glide into their new ordered positions at 60fps. The sorted header displays animated direction arrows.

LIMIT Cutoff Line

A dashed cut line marks the boundary. Rows beyond the cutoff line fade out into dimmed obscurity.

Pipeline Stepper & Scrubbing

Click any clause chip (FROM → WHERE → SELECT → ORDER BY → LIMIT) to scrub the table back to that exact state, or hit Step Through to auto-play.

Keyword Hover Linking

Hover over any keyword in the editor (e.g. WHERE or ORDER BY) and see the corresponding columns and cutoff lines highlight immediately in the table.

No Red Error Flashes

Typing is calm. The editor never screams on partial queries. Helpful plain-English suggestions appear after you pause.

3-Tier Progressive Hints

Get nudged without giving away the answer. Solutions unlock only after you have explored the progressive hints.

Instant Diff Checking

Compare your result side-by-side with the expected answer. Get granular diagnostics on order, columns, and filters.

Intuitive Flow

How It Works

Three steps to mastering relational query execution.

1

Read the Question

Inspect the scenario, requirements, and interactive table schema. Understand which records must be retrieved.

2

Watch the Table React

As you write SELECT, WHERE, ORDER BY, and LIMIT, the live visualizer mutates rows and columns before your eyes.

3

Submit & Compare

Press Run to test against verified test cases. If incorrect, side-by-side diff highlights exact discrepancies.

Recommended Learning Path

SQL Study Plans

Work through one skill at a time, from basic filtering to window functions and hard interview questions. Each plan goes from easy to hard.

SQL Basics

Every SQL interview starts here. These questions cover choosing rows with WHERE, combining conditions, handling NULLs, sorting with ORDER BY and keeping only the rows you need with LIMIT and DISTINCT.

20 questions · 9 Easy · 8 Medium · 3 Hard

SQL Joins

Joins are where most interview answers go wrong: rows disappear, duplicate or turn NULL. Work through inner and outer joins, self joins on the same table and anti joins that find rows with no match.

20 questions · 8 Easy · 8 Medium · 4 Hard

GROUP BY & Aggregation

Most analytics questions boil down to grouping rows and summarising them. Practise COUNT, SUM and AVG, filtering groups with HAVING, counting distinct values and building ratios with conditional aggregation.

20 questions · 8 Easy · 8 Medium · 4 Hard

Subqueries & CTEs

Harder questions need more than one step. Learn to break a problem into stages with WITH clauses, compare rows against a group result with correlated subqueries and reuse derived tables.

20 questions · 4 Easy · 12 Medium · 4 Hard

Window Functions

Window functions are the most common topic in mid-level and senior SQL interviews. Rank rows within groups, compare each row with the previous one and compute running totals without collapsing your result.

20 questions · 13 Medium · 7 Hard

Dates & Time

Product and analytics interviews love dates. Practise date arithmetic, grouping by month, comparing periods, finding consecutive days and building retention and cohort reports.

20 questions · 8 Easy · 8 Medium · 4 Hard

Hard Questions

Ready for senior-level rounds? These questions combine several techniques at once: window functions inside CTEs, gaps and islands, sessionization and multi-step funnel and retention analysis.

20 questions · 20 Hard
View all study plans
Clarifications

Frequently Asked Questions

Yes. Every question, the step-by-step visualizer and answer checking are free. You can practise without an account; signing in with Google saves your progress and streak.
MySQL 8 and PostgreSQL. Pick the dialect above the editor; every question has verified answers for both.
No. Queries run in your browser: MySQL questions on DuckDB with MySQL compatibility rules, and PostgreSQL questions on PGlite, a real PostgreSQL build compiled to WebAssembly.
When you sign in, your solved questions, attempts and daily streak are saved to your account. Without an account, solved questions are only kept while the tab is open.
Press Run & Check (or Ctrl+Enter). Your result is compared with a verified expected result, including column names and row order when the question asks for it, and you get specific feedback on what differs.
They are modelled on SQL interview questions that candidates report on public prep sites, plus classic interview patterns. A company tag means a similar question was reported for that company, not that it is an official question.
Curated sets of up to 20 questions for one skill, such as joins, aggregation or window functions, ordered from easy to hard. They are a good way to prepare for a specific interview round.