SQL + Data Manipulation (SQL/Python) Interview Questions
Practice the exact questions companies are asking right now.

"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 percent of first-cancel users who never return
You’re analyzing appointment behavior for a scheduling product. Table appointments - appointment_id (STRING, PK) - user_id (STRING) - scheduled_start_...
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 to compute campaign net revenue
Using the schema and sample data below, write SQL to produce, for each campaign_id and segment, the following metrics for August 2025: total_reached, ...
Find top category by video time spent
Pandas required. You are given a DataFrame df with columns: user_id (int), pin_id (int), pin_type (str), category (str or None), time_spent_sec (numer...
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/pandas for KPI anomaly
Write SQL (and outline equivalent pandas) for a KPI anomaly investigation. Assume today = '2025-09-01'. Schema: Users(user_id INT, country TEXT, signu...
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...
Write SQL for theme-park revenue and visits
You are given theme-park ticketing and visits data. Write SQL to answer the following, using the sample schema and tables below. Return both the query...
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 ...
Generate binomial matrix and column-normalize
Using Python with NumPy, generate a 100×100 matrix of Binomial(n = 10, p = 0.3) draws with a fixed random seed, then normalize each column so it sums ...
Write SQL for hashtag source and safety rates
Write SQL for the two tasks below. Assume the schema and sample data as given, and that “today” is 2025‑09‑01. Deduplicate exact duplicates by (date, ...
Find daily first-order merchants with SQL
Given the table below, write a single SQL query using window functions to: A) For each calendar date (UTC), return all merchant_id(s) whose order is t...
Design student–course data models and SQL
Scenario: Model a university domain with Students, Courses, Departments, Instructors, and Enrollments. Tasks: 1) OLTP ERD: Specify normalized tables w...
Compute join counts and window ranks
Given the following small schema and data, answer all parts precisely and justify each count/output. Tables and rows: Customers(cust_id INT PRIMARY KE...
Write SQL for cohort retention and ARPU
Using PostgreSQL, compute monthly signup cohort D30 retention and 30-day ARPU. Cohort month = date_trunc('month', signup_date). D30 retention = users ...
Write SQL filtering, grouping, CASE, UNION tasks
Use the following schema and sample data to answer all parts. Assume standard ANSI SQL and that amounts are DECIMAL. Table: orders +----------+-------...
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...
Query and transform marketplace data in SQL/Python
Assume today is 2025-09-01. Use the following schema and sample data to answer the questions with both SQL (preferred) and equivalent Python (pandas) ...
Count buggy vs non-buggy by employer
Count buggy vs non-buggy submissions for each employer_id, including employers with zero submissions. Return employer_id, buggy_count, non_buggy_count...
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...