Data Manipulation (SQL/Python) Interview Questions

Practice 682 real Data Manipulation (SQL/Python) interview questions for 2026. Data Manipulation (SQL/Python) interview questions cover the core data work hiring teams use to judge day-one competence: translating product metrics into correct queries, handling edge cases (NULLs, late-arriving events, double-counting), writing efficient joins and window functions, and producing readable, reproducible Pandas code. Real interviews with detailed solutions in this category test both correctness and engineering judgment, not just syntax. Expect these questions across analytics and data-engineering loops at companies that weight practical querying heavily — especially Meta, Amazon, and TikTok. Interviewers evaluate problem scoping, test-case thinking, query performance, and clear communication of assumptions. For interview preparation, focus on hands-on practice: timed live SQL exercises, Pandas data-cleaning drills, and walking through tradeoffs when a naive query will be too slow. Practical habits that help in interviews include writing concise, well-commented queries, stating assumptions up front, and verifying results with small, explicit test cases.

682 Questions 114 Companies08.03.2026
Showing 20 results
Role
Amazon logo
Amazon
Medium
Business Intelligence Engineer

Create Monthly Revenue Report for Each Department

DEPARTMENT_REVENUE +------------+---------+-------+ | Department | Revenue | Month | +------------+---------+-------+ | A | 8000 | Jan |...

Data Manipulation (SQL/Python)
12
0
33 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Calculate Response Rate and Compare User Survey Ratings

USERS user_id | signup_date 10 | 2024-03-20 11 | 2024-04-01 12 | 2024-04-05 ​ SURVEYS survey_id | user_id | sent_at 1 | 10 ...

Data Manipulation (SQL/Python)
197
2
691 people solved
Jul 12, 2025
Amazon logo
Amazon
Medium
Business Intelligence Engineer

Identify Most Popular First-Watched Movie in Viewing History

MOVIE_VIEWS +------------+--------------------+------------+ | customer_id| title | date | +------------+--------------------+-----...

Data Manipulation (SQL/Python)
5
0
17 people solved
Jul 12, 2025
Coinbase logo
Coinbase
Medium
Data Scientist

Calculate Cumulative Sum for Each Integer in Table

numbers +-----+ | num | +-----+ | 1 | | 2 | | 13 | | 14 | | 15 | +-----+ Scenario You have a table containing one integer per row; for each row...

Data Manipulation (SQL/Python)
13
0
3 people solved
Jul 12, 2025
Amazon logo
Amazon
Medium
Data Scientist

Calculate Regional Revenue and Identify Top Customers

Customers | customer_id | name | region | |-------------|-------|--------| | 1 | Alice | East | | 2 | Bob | West | | 3 ...

Data Manipulation (SQL/Python)
9
1
4 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Determine Old vs. New Users' Shop Visibility Changes

SHOP_VISIBILITY_HISTORY +----------+----------------+---------------------+-------------------+---------+ | user_id | user_signup_dt | action_timesta...

Data Manipulation (SQL/Python)
61
0
5 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Analyze VR App Usage and Engagement Metrics

vr_usage +---------+------------+---------+------------+----------+ | user_id | date | app_id | session_id | duration | +---------+------------...

Data Manipulation (SQL/Python)
49
0
5 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Calculate Weekly CTR and Campaign-Specific CTR in SQL

AdEvents ad_id | campaign_id | event | view_id | event_date 1 | 10 | impression | 123 | 2023-11-07 1 | 10 | cli...

Data Manipulation (SQL/Python)
66
2
244 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Determine Product Buyer Count and Interaction Percentage

interactions +-----------+----------+------------+----+------------+ | seller_id | buyer_id | product_id | li | create_date| +-----------+----------+-...

Data Manipulation (SQL/Python)
13
0
34 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Identify Top 10 Users by Average Call Duration

video_calls | call_id | user_id | start_time | end_time | |---------|---------|----------------------|----------------------| | ...

Data Manipulation (SQL/Python)
6
0
29 people solved
Jul 12, 2025
Fannie Mae logo
Fannie Mae
Medium
Data Scientist

Understand SQL Aggregations and Joins: Key Differences Explained

Employees +----+--------+--------+---------+ | id | name | salary | dept_id | +----+--------+--------+---------+ | 1 | Alice | 70000 | 1 | ...

Data Manipulation (SQL/Python)
101
0
378 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Analyze Group Call Adoption Using SQL Queries

CALL_LOGS | call_id | user_id | call_start | call_end | is_group_call | participant_cnt | | 101 | 12 | 2023-08-01 10:00...

Data Manipulation (SQL/Python)
153
1
246 people solved
Jul 12, 2025
TikTok logo
TikTok
Medium
Data Scientist

Analyze and Clean European Ecommerce Sales Data

sales +----------+-------------+------------+---------+---------+----------------+ | order_id | customer_id | order_date | country | revenue | product...

Data Manipulation (SQL/Python)
51
0
94 people solved
Jul 12, 2025
Amazon logo
Amazon
Medium
Business Intelligence Engineer

Count Customers Buying Both 'Kindle' and 'Alexa'

ITEMS +---------+-----------+ | ITEM_ID | ITEM_NAME | +---------+-----------+ | 101 | Kindle | | 202 | Alexa | | 303 | Fire TV | ...

Data Manipulation (SQL/Python)
12
0
24 people solved
Jul 12, 2025
TikTok logo
TikTok
Medium
Data Scientist

Identify Top Discounts and Monitor Code Submissions

Products +------------+----------+-------+----------+ | product_id | category | price | discount | +------------+----------+-------+----------+ | 101 ...

Data Manipulation (SQL/Python)
69
0
269 people solved
Jul 12, 2025
OneMain Financial logo
OneMain Financial
Medium
Data Scientist

Count, Return, Find, and Select in SQL Queries

orders +----------+--------------+------------+--------+ | order_id | customer_id | order_date | amount | +----------+--------------+------------+---...

Data Manipulation (SQL/Python)
78
0
197 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Calculate Total Interactions for Each Product

Interactions +----------+-----------+------------+--------------+ | buyer_id | seller_id | product_id | interactions | +----------+-----------+-------...

Data Manipulation (SQL/Python)
56
0
181 people solved
Jul 12, 2025
Amazon logo
Amazon
Medium
Business Intelligence Engineer

Identify Employees with Invalid Department References

EMPLOYEE +-----+-----+--------+ | eid | did | ename | +-----+-----+--------+ | 1 | 10 | Alice | | 2 | 11 | Bob | | 3 | 99 | Carol | +--...

Data Manipulation (SQL/Python)
7
0
13 people solved
Jul 12, 2025
Robinhood logo
Robinhood
Medium
Data Scientist

Analyze Transaction Flow and User Engagement Efficiently

transactions +---------------+-------------+------------+--------+ | transaction_id| from_user_id| to_user_id | amount | +---------------+------------...

Data Manipulation (SQL/Python)
49
0
4 people solved
Jul 12, 2025
Roblox logo
Roblox
Medium
Data Scientist

Generate Friendship List with Acceptance Dates Using Pandas

friend_events | requester_id | accepter_id | request_date | accept_date | |--------------|-------------|--------------|-------------| | 1 |...

Data Manipulation (SQL/Python)
56
0
5 people solved
Jul 12, 2025

Frequently Asked Questions

How difficult are Data Manipulation (SQL/Python) interview questions?
Data Manipulation (SQL/Python) interview questions range from basic to advanced. Entry-level questions test filtering, joins, simple aggregates and pandas groupby, while mid and senior roles push multi-table joins, window functions, deduping, time-series alignment, null-handling, and performance trade-offs. Interviewers at companies that weight this category heavily, such as Meta, Amazon and TikTok, look for correctness, edge-case thinking, readable code, and clear trade-off explanations. The challenge is rarely obscure syntax; it is turning an ambiguous product or metric prompt into a robust query or transformation that scales and survives messy, real-world data.
Where in a typical interview loop does data manipulation appear and what formats should I expect?
Data manipulation shows up across the loop: initial technical screens often include 30 to 60 minute live SQL or Python problems, take-home assignments use Jupyter or SQL editors for end-to-end cleaning and analysis, and on-site rounds dedicate 45 to 60 minutes to deeper problems that combine query writing with product framing or A/B test interpretation. Companies such as DoorDash, Capital One and Meta commonly place heavy emphasis on this category in both phone screens and loop rounds. Expect a mix of live coding, whiteboard-style reasoning about schemas, and short conversations where you must justify assumptions and performance choices.
How long should I prepare for data manipulation interviews?
Preparation time depends on baseline skill and target company. If you already write SQL and pandas daily, focused sharpening of edge cases and timed practice for two to six weeks often suffices. Candidates aiming at heavily SQL-weighted loops at Meta, Amazon or other top firms typically plan six to twelve weeks to rebuild pattern recall, drill window functions, and rehearse product-driven questioning. Prioritize active practice: solve real-schema SQL problems, build small Python notebooks that replicate common ETL steps, simulate timed screens, and do a few mock interviews to practice explaining assumptions under pressure.
What are the key subtopics I must master in SQL and Python for data manipulation rounds?
Master the basics first: joins, aggregations, GROUP BY semantics, and filtering versus HAVING. Move to window functions for ranking, lead/lag and cumulative metrics, and CTEs for readable stepwise transformations. Handle nulls, deduplication, time alignment, string parsing and timezone-aware date arithmetic. In Python focus on pandas groupby, merges, pivoting, boolean indexing, rolling computations and writing clean, vectorized code. Also understand performance considerations: explain why you choose SQL versus Python for a particular workload and how to reduce row explosion or costly cross joins when working with real datasets.
What standout tips and common pitfalls should I watch for during interviews?
Always start by clarifying the metric, sample schema, and edge cases, and sketch expected sample output before coding. Use small example rows to validate logic and state assumptions about nulls, duplicates, and timezones. Prefer readable CTEs or well-commented pandas steps over one-line cleverness. Watch common pitfalls such as double-counting from incorrect joins, applying HAVING instead of WHERE, off-by-one window boundaries, and failing to dedupe before aggregation. Finally, communicate complexity and trade-offs: explain how your solution handles scale, when you would push work into the warehouse, and what tests you would run in production.

Explore more Data Manipulation (SQL/Python) interview questions

Jump straight to Data Manipulation (SQL/Python) questions at a specific company or for a specific role.

By company
By role