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."
Use OrderedDict to dedupe stably
Implement dedupe_preserve_order(seq) that removes duplicates from a list while preserving the order of first appearance, in O(n) time and O(k) space (...
Write SQL for rolling frequency caps
You work on ad serving with per-user rolling 7-day frequency caps at the campaign level. Assume "today" is 2025-09-01 and t0 = 2025-09-01 12:00:00 UTC...
Build the auction status table
You are given three tables for an auction system. Table: buyers - id INT PRIMARY KEY - username VARCHAR Table: lots - id INT PRIMARY KEY - name VARCHA...
Write PostgreSQL updates with date filters
Write PostgreSQL statements to: ( 1) update a flight's price and set updated_at correctly; ( 2) upsert a booking record with conflict handling; ( 3) s...
Write SQL to compute signup and retention lift
You are analyzing an A/B test for a marketing campaign that offers a free 1‑month trial. Assume all timestamps are in UTC. Tables experiment_assignmen...
Calculate User Registration Date and 7-Day Retention Rate
user_posts +---------+--------------+-----------+ | user_id | posting_date | num_posts | +---------+--------------+-----------+ | 1 | 2023-01-01...
Calculate Total Interactions for Each Product
Interactions +----------+-----------+------------+--------------+ | buyer_id | seller_id | product_id | interactions | +----------+-----------+-------...
Clean and Analyze User Transactions with Python Functions
transactions +---------+---------------------+---------+ | user_id | trans_ts | amount | +---------+---------------------+---------+ | 11 ...
Consolidate and Rank Global Salaries in USD
employees_us +---------+----------+--------+---------+ | emp_id | name | salary | country | +---------+----------+--------+---------+ | 1 |...
Aggregate User Activity, Fit Regression, Interpret Coefficients
user_metrics +----------+------------+---------+--------+-----------+ | user_id | activity_dt| variant | clicks | purchases | +----------+-----------...
Analyze VR App Usage and Engagement Metrics
vr_usage +---------+------------+---------+------------+----------+ | user_id | date | app_id | session_id | duration | +---------+------------...
Design Schema and Logic for Subscription Event Tracking
user_subscription_events +----------+-------------+---------------------+-----------+---------+ | user_id | event_type | event_time | plan_...
Analyze Recent User Engagement in Video Calls
calls +-----------+-----------+---------------------+---------+---------+ | caller_id | callee_id | call_start_timestamp| country | call_id | +-------...
Identify Date with Highest Total kWh Consumption Using Pandas
meter_readings +----------+------------+---------------+---------+ | meter_id | timestamp | kwh_consumed | city | +----------+------------+------...
Compute pirated-theme usage and revenue loss
You work on a theme marketplace. Some shops install pirated themes instead of paying for official themes. Assume all timestamps are in UTC. Tables sho...
Compute churn with re-subscriptions
You are analyzing a free-month subscription experiment. Assume experiment eligibility has already been computed; every user in the experiment table is...
Implement scalable word count locally
Write a function that reads a very large text file and outputs the frequency of each word. Define your tokenization and normalization rules (case fold...
Compute most popular location with weights
You are given a dataset of voting records for concert locations. Each record includes voter_id, location_text, and an optional numeric weight (default...
Write PostgreSQL string-manipulation query
You are given a PostgreSQL table clickstream(session_id TEXT, page TEXT, query TEXT, ts TIMESTAMP). The page column contains full URLs like 'https://s...
Write Postgres string parsing and aggregation query
You are given a PostgreSQL table events(user_id TEXT, raw TEXT) where raw stores pipe-delimited key=value pairs, for example 'user=U1|country=US|ts=20...