Data Scientist Data Manipulation (SQL/Python) Interview Questions
Practice 530 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."
Compute time-spent percentage by app category
You work on Oculus app engagement analytics. Tables user_activity - user_id (BIGINT) - date (DATE) — day of activity (assume UTC) - app_id (INT) - ses...
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...
Compare Spark RDDs, DataFrames, and SQL Performance Gains
SparkJobs +---------+---------+---------------------+----------+ | job_id | user_id | submit_time | status | +---------+---------+---------...
Analyze Seller Activity and Vehicle Listing Interactions
listing_interaction +-----------+-----------+------------+------------+----+ | buyer_id | seller_id | date | product_id | li | +-----------+---...
Calculate Medical Claims by Age and Gender in 2024
MEMBERSHIP +----+----------+--------+---------+ | id | age_band | gender | zipcode | +----+----------+--------+---------+ | 1 | 18-25 | F | 9...
Analyze Customer Purchase Patterns Using SQL Query
orders +----------+-------------+-------------+------------+------+ | order_id | customer_id | order_value | order_date | city | +----------+---------...
Determine Top Advertisers by Conversion Rate and CTR Analysis
ads +-------+---------------+------------+ | ad_id | advertiser_id | created_at | +-------+---------------+------------+ | 1 | 101 | 202...
Write SQL to analyze shop visibility
You are given two tables. Use standard SQL (window functions allowed). Assume "today" is 2025-09-01 and that “currently visible” means a shop’s last s...
Write SQL for daily chats and fast replies
You are given a messaging events table that records one row per message sent. Schema - messages( date DATE, -- calendar date of event (UTC) ts TIMES...
Define and query shop visibility
You are given the following schema. Use only the columns provided; do not introduce new fields or labels. Tables and columns: - shops(shop_id INT, sho...
Write SQL to monitor weekly chargeback spikes
Write a single SQL query (PostgreSQL) to detect weekly chargeback spikes by country and industry. Week starts Monday (use date_trunc('week', ts) with ...
Diagnose MySQL joins and GROUP BY/HAVING errors
You are using MySQL 8.0 with ONLY_FULL_GROUP_BY enabled. Answer all parts precisely. Provide the exact SQL you would run and the final result shapes/v...
Assess SQL joins, unions, windows, dedup, and pandas
Using the schema and sample data below, answer all sub-questions. Unless stated, assume ANSI SQL and explain any dialect-specific choices. Schema: - c...
Write SQL for top student per department
Schema: Departments(dept_id PK, dept_name) Students(student_id PK, student_name, dept_id FK nullable, gpa numeric(3,2) nullable, enrolled_at date) Sam...
Convert integer dates to quarters
Given an 8-digit integer date_key in YYYYMMDD (e.g., 20240331), write: (a) a SQL expression and (b) a Python function that convert it to a quarter lab...
Analyze NYC taxi trips efficiently over last 7 days
Use today = 2025-09-01. Consider NYC taxi trip data over the last 7 days inclusive (2025-08-26 to 2025-09-01, America/New_York). You receive two datas...
Write SQL to rank advertisers and profitability
You are given two denormalized tables. Use ANSI SQL (CTEs allowed) and UNPIVOT (or an equivalent UNION ALL approach if UNPIVOT is unavailable). Table:...
Compute CTR overall and by campaign type
Write SQL to compute: (Q1) overall click-through rate (CTR = clicks/impressions) in the last week; (Q2) CTR by campaign_type in the last week. Assume ...
Compute unconnected 60s posts and reactions averages
Given these tables and sample data, write SQL that answers both tasks below. Use today = 2025-09-01 and interpret "last/past 7 days" as the inclusive ...