SQL Interview Questions
Practice SQL interview questions from top companies. Filter by difficulty, role, and SQL concept.
All SQL Questions
Write SQL for top categories and highly active users
Analyze Pirated Theme Usage
Compute Company Suggestion Funnels
Analyze Pirated Theme Usage Impact
Debug ML pipeline and build text parser
Write SQL for seller and vehicle metrics
Top 5 Most Efficient Vehicle Models
Write SQL for TikTok Live creator metrics
Compute early signals for user retention
Debug and harden trial-assignment Python code
Calculate Order Request Metrics
Write SQL for percent and window changes
Find top category by video time spent
Find top-paid employee per department
Compute each member’s current notification status
Compute C/T metrics from bookings and visits
Merge CSVs and build revenue pivot with pandas
Write SQL for geo posting-frequency drops
Train and analyze a classifier
Count weekly customers with ≥$1000 YTD spend
Write SQL for influence score and follower growth
Detect sessions and gaps using SQL LEAD
Analyze member video posting behavior by country
Write SQL window functions for D7 retention
Analyze video flags and reviews with SQL
Write SQL to compute campaign net revenue
Compute CTR drop with exclusions
Find top advertisers and cost per KPI
Parse and build binary data in Python
Transform clickstream with pandas sessionization
Solve SQL and Python OA tasks
Calculate CTR and ad revenue
Write SQL for top drivers and cancellation rates
Write SQL and Python for transaction analytics
Implement vectorized NumPy ops and explain broadcasting
Find top countries by population per continent
Compute article-type diversity per user and histogram
Compute join counts and window ranks
Explain handling very large datasets
Transform and aggregate messy event data
Find recommended friend pairs by shared listening
Analyze shopping funnel with joins and windows
Write SQL for DAU and first-purchase conversion
Write SQL for cuisine median delivery times
Compute monthly signups, conversion, and YoY growth
Reconcile ledgers with SQL/Python and late events
Compare SQL counts, windows, and NULL semantics
Count unconnected posts and reactions
Compute Heavy-Caller Percentages
How to Prepare for SQL Interviews
SQL interviews for data analyst, data scientist, and software engineering roles focus heavily on your ability to write efficient queries and understand relational database concepts. Success requires mastering both fundamental syntax and advanced techniques that appear frequently in real interviews.
Master the Core Concepts
Start with JOINs, window functions, CTEs, and aggregations - these form the foundation of most interview questions. Understanding when to use INNER JOIN versus LEFT JOIN, or knowing the difference between ROW_NUMBER() and RANK(), will help you solve 80% of SQL interview problems.
Common Patterns You'll See
Companies like Meta, Google, and Amazon frequently test specific patterns: Top-N per group, deduplication, rolling metrics, retention cohorts, funnel conversion, and sessionization.
Practice with Real Company Questions
The best way to prepare is practicing questions from your target companies. Use the company filter above to practice relevant questions.