SQL Interview Questions
Practice SQL interview questions from top companies. Filter by difficulty, role, and SQL concept.
All SQL Questions
Count unconnected posts and reactions
Write SQL for reply-based recipient metrics
Analyze Pirated Theme Usage Impact
Compute ad impression conversion rates
Write SQL for repeat churn
Query departments and top earners
Compute a Seven-Day Rolling Average
Calculate Cohort Retention
Analyze spend cohort and source shifts
Compute churn with re-subscriptions
Write SQL for call metrics
Find high-value crypto users and top CTR
Compute High-Call Usage Rates
Compute Cohort Retention Rate
Explain Pandas and SQL Basics
Find Top-5 Similar Rows
Analyze advertiser spend by source
Write SQL for multi-account metrics
Count Recent High-Volume Call Users
Analyze Restaurant Customer Metrics
Handle repeated churn in SQL
Calculate Pirated Usage and Revenue Loss
Find least active countries
Differentiate pandas objects and SQL filters
Count heavy callers in 7 days
Find high-value crypto users and top-CTR product
Implement vectorized NumPy ops and explain broadcasting
Write SQL using HAVING and window functions
Find top advertisers and cost per KPI
Clean and Merge Housing Data
Write SQL for call pickup and usage metrics
Debug and harden trial-assignment Python code
Write SQL for percent and window changes
Use pandas to aggregate, pivot, and label
Compute Ride Metrics in SQL
Pivot daily users and revenue by platform
Write SQL for seller and category metrics
Write SQL for top categories and highly active users
Compute article-type diversity per user and histogram
Compute this-year spend share of last-year whales
Find Lowest Prices for Highly Rated Categories
Debug row loss after SQL joins
Write SQL to compute signup and retention lift
Write SQL and Python for transaction analytics
Write SQL for seller and vehicle metrics
Write SQL for CTR and Revenue
Write SQL for call analytics
Clean scores and return top 5 students
Find multi-account buckets and unread rate
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.