Amazon Data Manipulation (SQL/Python) Interview Questions
Amazon Data Manipulation (SQL/Python) interview questions at Amazon focus on practical problem solving with real-world data: efficient joins and window functions in SQL, group and aggregate logic, NULL-handling and performance tradeoffs, and equivalent Pandas/NumPy patterns for in-memory work. What’s distinctive is the mix of product-sense and scale-awareness — interviewers evaluate both correctness and how your solution would behave on large tables or within a production pipeline. Expect timed live-coding or take-home tasks where clarity of assumptions, test cases, and incremental refinement matter as much as final syntax. For interview preparation, prioritize translating tasks between SQL and Pandas, practicing common subproblems (deduplication, rolling/window calculations, CTE refactors, and merge strategies), and explaining complexity and scalability tradeoffs. Be ready to justify index or partition choices, to optimize a slow query, and to narrate decisions with Amazon’s customer-and-ownership lens. Practicing with real datasets and mock interviews that simulate pressure will improve fluency and the concise communication Amazon looks for.

"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."
Retrieve First Active and Last Inactive Dates per User
Given a table activity that tracks user activities, write a SQL query to retrieve the first active date and last inactive date for each user. Table Sc...
Find recommended friend pairs by shared listening
Problem (SQL) You work on a music app and want to recommend new friend connections based on listening similarity. Tables Assume the following schemas:...
Find recommended friend pairs by shared songs
You work on a music app and want to recommend “friend” connections based on listening similarity. Assume the following tables (all timestamps are in U...
Select Top Customers Using Transaction Data Filters
transactions +----+---------+------------+--------+ | id | user_id | order_date | amount | +----+---------+------------+--------+ | 1 | 101 | 202...
Implement robust word counts and min/max
You receive a 50GB UTF-8 text corpus on disk. Implement a Python solution that:\n- Streams the file without loading it fully into memory.\n- Counts ca...
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...
Build DID panel and compute effects in SQL
Using the schema and toy data below, write SQL to construct a user-week panel and compute a clean pre/post DID dataset for first reminder exposure. Re...
Process real-time enter/exit events and actives
You receive a real-time stream of events with schema: user_id (str), channel (str), event_type ("enter"|"exit"), ts (UTC ISO timestamp). A user can ‘e...
Design idempotent daily loads with deduping
You need to load the last 7 days of orders into a large fact table from a noisy staging feed. Assume today is 2025-09-01. Requirements: idempotent rer...
Write SQL window functions for D7 retention
Assume you have the following tables (timestamps are in UTC). 1) game_sessions - user_id (STRING) - session_start_ts (TIMESTAMP) - country (STRING) Ea...
Identify Top-Buying Customers Daily with SQL Query
PRIME +-------------+------------+----------+ | Customer_ID | Start_Date | End_Date | +-------------+------------+----------+ | 1 | 2025-01-...
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...
Analyze Top Book Sales and Unique Customer Purchases
BOOK_TRANSACTION +---------------+------------+-------------+------+----------+ | MARKETPLACE_ID| TXN_DAY | CUSTOMER_ID | ASIN | QUANTITY | +------...
Compute unique visitors per department from clicks
Given tables Products(product_id, department, category, subcategory) where department > category > subcategory form a hierarchy, and ClickLog(user_id,...
Identify Top-Buying Customers Daily with SQL Query
PRIME +-------------+------------+----------+ | Customer_ID | Start_Date | End_Date | +-------------+------------+----------+ | 1 | 2025-01-...
Find top-spend categories per customer with ranking
Using the schema and sample data below, write a single ANSI SQL query (CTEs allowed; no temp tables) that returns, for each customer, their top 2 prod...
Identify Employees with Invalid Department References
EMPLOYEE +-----+-----+--------+ | eid | did | ename | +-----+-----+--------+ | 1 | 10 | Alice | | 2 | 11 | Bob | | 3 | 99 | Carol | +--...
Illustrate SQL Join Results with Duplicate Keys
TABLE1 +------+ | col1 | +------+ | 1 | | 1 | | 1 | +------+ TABLE2 +------+ | col1 | +------+ | 1 | | 1 | | 1 | | 1 | | 1 |...
Identify Most Popular First-Watched Movie in Viewing History
MOVIE_VIEWS +------------+--------------------+------------+ | customer_id| title | date | +------------+--------------------+-----...
Calculate Rolling 7-Day Sum of Answers by Device
ANSWERS +------------+--------+---------+ | date | device | answers | +------------+--------+---------+ | 2019-01-01 | echo | 10 | | 2019...