Data Manipulation (SQL/Python) Interview Questions
Practice 653 real Data Manipulation (SQL/Python) interview questions for 2026. Covers companies like Meta, Amazon, TikTok, DoorDash, and Capital One. Real questions from actual interviews with detailed solutions — designed for focused interview preparation for data analysts, data scientists, and data engineers who must move fluidly between SQL and Python during live screens and take-home tasks. These questions emphasize practical skills: writing correct, efficient SQL (joins, GROUP BY, window functions, CTEs, NULL handling, and performance-aware predicates) and idiomatic Python/Pandas solutions (vectorized transforms, merges, reshaping, datetime handling, and robust data-cleaning). Interviewers evaluate correctness, edge-case reasoning, runtime and memory tradeoffs, reproducibility, and clear communication of assumptions. Expect timed whiteboard-style queries, pair-programming in a shared editor, and take-home notebooks. To prepare, practice translating SQL ↔ Pandas, explain results aloud, time-box exercises, test edge cases, and review common pitfalls such as NULL semantics, grouping logic, off-by-one errors, and inefficient joins.

"I got asked a hardcore MCM DP question and I saw it on PracHub as well. Solved that question in 5 minutes. Without PracHub I doubt I could solve it in 5 hours. Though somehow didn't get hired, perhaps I guess I solved it too fast? /s"

"Believe me i'm a student here jn US. Recently interviewed for MSFT. They asked me exact question from PracHub. I saw it the night before and ignored it cause why waste time on random sites. I legit wanna go back and redo this whole thing if I had chance. Not saying will work for everyone but there is certainly some merit to that website. And i'm gonna use it in future prep from now on like lc tagged"

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
Print the K-th non-empty line
Given a large UTF-8 text file, write a program that prints the K-th non-empty line. Do not load the whole file into memory. Specify how you handle fil...
Clean scores and return top 5 students
Implement a Python function to clean and rank student scores. You are given a table (or DataFrame) students with schema: | column | type | notes | |--...
Calculate CTR and ad revenue
This interview included two SQL tasks. Task 1: Compare CTR during peak and non-peak hours You are given three tables: - ads(ad_id BIGINT, advertiser_i...
Compute daily active ads
SQL: Daily active ads You are working on an ads platform. Tables ads - ad_id BIGINT (PK) - advertiser_id BIGINT - status STRING -- one of ('ACTIVE','...
Find top category per region in Aug 2025
You are given the following schema and sample data. Schema: - customers(customer_id INT, name TEXT, region TEXT) - orders(order_id INT, customer_id IN...
Write SQL for profit, growth, retention
Write ANSI-SQL (PostgreSQL preferred) for the tasks below. Assume all timestamps are UTC and that "today" = 2025-09-01. Schema: - products(product_id ...
Verify subscriptions and analyze orders with SQL/Python
You are given two tables. Write SQL and Python (pandas) to answer the sub-questions precisely, handling edge cases, ties, and missing data. Schema - s...
Compute percent of active users with 50+ calls
Problem You work on a Messenger-like app. You want to measure how many active users in Great Britain (GB) today have been heavy callers recently. Tabl...
Implement a nested object validator
Implement a helper function validate(object, required_style) that checks whether a possibly nested object matches a provided schema. The object may co...
Analyze Multiple-Account Users in SQL
You are analyzing a product in which a single user can own multiple accounts. Use the following tables: accounts - account_id BIGINT — unique account ...
Find Top-5 Similar Rows
You are given two point-in-time snapshot tables generated on the same day in UTC. There is no direct key relationship between the tables; each row in ...
Compute specialty spend share and top age band
You are given healthcare claims data split across member tables. Tables Assume the following schemas (types may be adapted to your SQL dialect): mem1 ...
Implement filters and cursor pagination
Design and implement a transaction query module over a dataset or database where each transaction has startDate, endDate, userId, and amount. Requirem...
Implement paginated API ingestion
You are given a REST endpoint GET /orders?page=1&limit=100 that returns JSON objects of the form { "page": n, "per_page": m, "total_pages": T, "data":...
Aggregate D1 retention cohorts in SQL
Today is 2025-09-01. Using SQL (optionally outline a pandas approach too), compute daily engagement and D1 retention for the last 7 days (2025-08-26 t...
Write complex SQL on DoorDash data
You are given the following BigQuery-style schema and tiny samples (assume timestamps are UTC; assume promotions.discount_amount is the applied discou...
Compute Moderation View Metrics
Question You are working on a content moderation analytics problem. You have two tables. Table 1: content_views (one row per user / post / day) - user...
Analyze spend cohort and source shifts
You work on an ads platform. Assume all timestamps are in UTC. Interpret last year as calendar year 2023 and this year as calendar year 2024. Tables: ...
Find high-value crypto users and top CTR
You are given three tables. Assume all timestamps are stored in UTC. - users(user_id BIGINT PRIMARY KEY, create_date TIMESTAMP): one row per user acco...
Identify false MySQL foreign key statement
MySQL: Which of the following statements is false? A) A column might have a foreign key reference to itself. B) MySQL supports foreign key references ...