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.

67 Questions 1 Company06.08.2026
Showing 20 results
Role
Amazon logo
Amazon
Medium
Data Scientist Locked

Monthly Cohort Retention

This question evaluates practical SQL skills in user retention analysis, specifically the ability to build a monthly cohort retention table from raw a...

Data Manipulation (SQL/Python)
3
0
31 people solved
Jun 8, 2026
Amazon logo
Amazon
Medium
Data Scientist

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...

Data Manipulation (SQL/Python)
11
1
156 people solved
Nov 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

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...

Data Manipulation (SQL/Python)
8
0
83 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist Locked

Compute a Rolling Seven-Day Revenue Sum with Missing Dates

Solve a PostgreSQL rolling-revenue problem that needs a complete daily series per seller, including no-order dates. It assesses UTC date handling, gap...

Data Manipulation (SQL/Python)
7
0
63 people solved
Jun 4, 2026
Amazon logo
Amazon
Medium
Data Scientist

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...

Data Manipulation (SQL/Python)
6
0
108 people solved
Oct 13, 2025
Amazon logo
Amazon
Easy
Data Scientist

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:...

Data Manipulation (SQL/Python)
9
1
104 people solved
Nov 20, 2025
Amazon logo
Amazon
Medium
Data ScientistSenior+

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...

Data Manipulation (SQL/Python)
4
0
79 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Business Intelligence Engineer

Compute First Order Proportions by Day and Category

ORDERS +----------+------------+----------+-------------+ | order_id | date | category | customer_id | +----------+------------+----------+-----...

Data Manipulation (SQL/Python)
6
0
20 people solved
Jul 12, 2025
Amazon logo
Amazon
Medium
Data Scientist

Design SQL/Pandas aggregations on retail schema

Using the schema and sample data below, answer both parts. Assume today is 2025-09-01. Use standard SQL (e.g., PostgreSQL) and idiomatic pandas withou...

Data Manipulation (SQL/Python)
0
0
7 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Derive Key Business Metrics Using SQL or Python

Orders +----------+-------------+------------+---------+------------------+ | order_id | customer_id | order_date | amount | product_category | +----...

Data Manipulation (SQL/Python)
0
0
4 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

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...

Data Manipulation (SQL/Python)
5
0
46 people solved
Dec 20, 2025
Amazon logo
Amazon
Medium
Business Intelligence Engineer

Calculate Weekly Event Sums from Daily Counts

EVENT_LOG +------------+------+ | event_date | cnt | +------------+------+ | 2025-05-01 | 17 | | 2025-05-02 | 12 | | 2025-05-08 | 30 | +-------...

Data Manipulation (SQL/Python)
2
0
8 people solved
Jul 12, 2025
Amazon logo
Amazon
Medium
Data Scientist

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...

Data Manipulation (SQL/Python)
7
0
60 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Software Engineer

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,...

Data Manipulation (SQL/Python)
6
0
58 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software EngineerIntern

Manipulate time-series with Pandas groupby

Given a DataFrame events(user_id, event_type, ts_utc, revenue): 1) Parse ts_utc as timezone-aware, convert to America/Los_Angeles, and handle DST tran...

Data Manipulation (SQL/Python)
0
0
6 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Data Scientist

List Top Customers and Monthly Order Counts in SQL

Orders | order_id | customer_id | order_date | amount | |----------|-------------|------------|--------| | 1 | 101 | 2023-01-05 | 120.5...

Data Manipulation (SQL/Python)
0
0
5 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Calculate Weekly, Monthly Hours Watched by Premium Users

watch_events +-----------+----------+----------------+-----------------------+----------------+ | user_id | video_id | watched_minutes| watched_at ...

Data Manipulation (SQL/Python)
0
0
5 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Calculate Monthly Revenue from Orders in 2023

orders | id | order_date | customer | |----|------------|----------| | 1 | 2023-01-03 | 101 | | 2 | 2023-02-14 | 102 | | 3 | 2023-02-20 | 101 | ​ o...

Data Manipulation (SQL/Python)
0
0
5 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Ensure Correct Numeric Ordering in Visit ID Comparison

visits +----------+---------+-----------+---------------------+ | visit_id | user_id | page | visit_ts | +----------+---------+-------...

Data Manipulation (SQL/Python)
0
0
6 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Identify Key Metrics for Monitoring Shipment Defects

shipment +-------------+----------+------------+---------+---------+ | shipment_id | order_id | ship_date | carrier | status | +-------------+------...

Data Manipulation (SQL/Python)
0
0
8 people solved
Aug 4, 2025

Frequently Asked Questions

How difficult are Amazon Data Manipulation (SQL/Python) interview questions?
At Amazon, Data Manipulation (SQL/Python) questions range from basic SELECTs to complex window-function and multi-join puzzles. For entry-level roles you can expect medium-difficulty tasks such as filtering, aggregates, and simple joins, while mid-to-senior positions commonly include hard problems that require multi-step transforms, efficient windowing, common-table expressions, and memory-aware pandas code. Interviewers evaluate correctness, performance, and clarity of thought; minor syntax slips can be forgiven if reasoning is solid, but inefficiency or incorrect handling of NULLs and edge cases will lower your score. Time pressure and follow-up tradeoff questions often increase perceived difficulty.
Where in the Amazon interview process does Data Manipulation (SQL/Python) appear and how is it assessed?
Data Manipulation skills appear in several stages of an Amazon interview loop. Recruiter screens may include high-level questions, technical phone or video screens often use a collaborative editor for live SQL or pandas exercises, and on-site interviews or take-home assignments require writing production-quality queries and scripts. Different roles emphasize different aspects: analysts focus on aggregations and joins, data engineers evaluate scalability and query optimization, and data scientists mix transformation with modeling needs. Assessment typically covers correctness on sample data, efficiency considerations for large datasets, and your ability to explain assumptions and tradeoffs.
What is a realistic preparation timeline for Data Manipulation (SQL/Python) for Amazon interviews?
A focused four-to-eight week plan is realistic for most candidates. Begin with two weeks of fundamentals covering SQL joins, aggregates, window functions, CTEs, and pandas groupby/merge/vectorized operations. Spend the next two weeks solving timed problems that combine multiple transformation steps and practice writing efficient queries. Use the final weeks for mock interviews, end-to-end exercises on realistic datasets, and review of edge cases like NULLs, duplicates, and memory limits. Throughout, prioritize explaining your approach, reviewing mistakes, and rehearsing tradeoff discussions rather than only chasing quantity of problems.
What key subtopics should I master within Data Manipulation (SQL/Python) for Amazon interviews?
Master joins and data modeling choices, aggregate functions versus HAVING, and window functions for ranking and running metrics. Learn to use CTEs for stepwise transformations and be fluent in NULL handling, date and string manipulation, and grouping semantics. In Python and pandas, focus on merges, groupby-apply or transform patterns, pivoting and reshaping, vectorized operations to avoid slow loops, and using appropriate data types to save memory. Equally important is performance tuning: understand explain plans, indexing and partitioning basics, and when it’s better to push logic into SQL versus handling it in Python.
What standout tips and common pitfalls should I be aware of when preparing for Data Manipulation (SQL/Python) at Amazon?
Begin by clarifying requirements and state any assumptions; communication is part of the evaluation. Choose the tool that makes your solution clearer and more efficient, and be ready to justify that choice. Common pitfalls include ignoring NULL semantics, misordering joins causing row multiplication, using row-by-row operations in pandas instead of vectorized approaches, and overlooking performance implications on large tables. Always consider edge cases, write readable SQL or Python, and if optimization is needed explain indexing, partitioning, or vectorization strategies rather than attempting risky micro-optimizations under time pressure.

Explore more Amazon Data Manipulation (SQL/Python) interview questions

Real questions from candidate reports, grouped by role, topic and company.

By role
Other categories at Amazon
Data Manipulation (SQL/Python) questions at other companies
Browse all