Data Scientist Data Manipulation (SQL/Python) Interview Questions
Practice 550 real Data Manipulation (SQL/Python) interview questions for Data Scientist roles. From companies including Meta, Amazon, TikTok, Capital One, DoorDash.

"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."
Write SQL for recent customer activity
Write a single ANSI‑SQL query that produces, for every customer who has at least one non‑canceled order ever: (1) last_order_ts across all time consid...
Write SQL to flag coordinated fake accounts
Assume today is 2025-09-01. Schema and tiny samples: users(user_id, created_at, country) 1 | 2025-07-01 | US 2 | 2025-08-10 | IN 3 | 2025-08-15 | US 4...
Exclude free subscribers via anti-join
Extend your previous monthly new-subscriber + YoY query to exclude companies that ever received a free subscription, using an anti-join against Free_S...
Compute monthly new subscribers and YoY deltas
Write a single SQL query that returns monthly counts of new subscribers starting at 2019-06, plus year-over-year (same-month prior year) comparisons. ...
Compute 7-day views and reactions by relationship
Use the schemas and sample data below to answer two tasks. Assume dates are strings in 'YYYY-MM-DD'. Treat "today" as 2025-09-01; "last/past 7 days" m...
Join datasets and compute conversion by assignment
You are given two CSVs. Create tables and write SQL to produce both visit-level and visitor-level conversion datasets, then aggregate conversion by as...
Design logical model and consumption
Design a logical data model and consumption layer supporting business and technical services architecture. Provide an ERD‑level description for Accoun...
Write SQL for streaming cohort metrics
Given the schema and sample data below, write SQL to answer the three tasks. Use standard SQL (window functions allowed). Assume timestamps are UTC. T...
Aggregate video time and unique pins in Python
Part A (category by average time for videos): You receive a list of pin engagement rows and a category map. pins = [ {"pin_id": 10, "category_id": 1,...
Assess SQL cleaning, mapping, joins, keys, and DDL/DML
You inherit a small retail analytics warehouse. Use the schema and sample rows below to answer all parts. Schema and sample data (minimal rows shown):...
Compute daily net users from event logs
Given an event log, write SQL to compute, for the target date 2025‑09‑01 ("today"), the counts of new users, retained users, churn users, and net user...
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 (...
Diagnose DAU drop with SQL by country
Write a single SQL query to diagnose a country-level DAU drop for an email product. Assume today is 2025-09-01. DAU is the count of distinct user_id w...
Find the most-used app
You work on Oculus app engagement analytics. Tables user_activity - user_id (BIGINT) - date (DATE) — day of activity (assume UTC unless otherwise spec...
Perform EDA and diagnose data quality
Given a tabular dataset loaded into a pandas DataFrame, write code to perform exploratory data analysis end-to-end: inspect and report column data typ...
Calculate Longest Transaction Streak for Each User
transactions +---------------+---------+--------+----------------+-----------+----------+ | transaction_id| user_id | amount | transaction_date| merch...
Analyze Bookstore Data to Identify Top Payment Methods
books +---------+------------+----------+-------+ | book_id | title | author_id| price | +---------+------------+----------+-------+ | 1 | ...
Determine Growth of Pirated Theme Installations Over Years
merchants +-------------+------------+ | merchant_id | join_date | +-------------+------------+ | 1 | 2020-01-02 | | 2 | 2020-03-...
Calculate Distinct High-View Posts and Spam View-Prevalence
content_views | user_id | post_id | view_count | view_date | | 101 | 572 | 3 | 2021-11-01 | | 102 | 732 | 5 | 2021-1...
Identify Repeat Advertisers from Consecutive Weeks
SUBMISSIONS +--------------+-----------+-----------+ | advertiser_id| ad_id | week_id | +--------------+-----------+-----------+ | A123 ...