Amazon Data Analyst Interview Preparation Guide - Junior Level (1-2 Years)
Amazon's Data Analyst interview process for junior-level candidates consists of 6 rounds spanning approximately 3-4 weeks. The process begins with a recruiter screening call, followed by a technical phone screen assessing SQL and Python proficiency. Candidates then advance to four onsite/virtual rounds evaluating data case analysis, analytics and experimentation design, business acumen and product metrics understanding, and cultural fit with Amazon's Leadership Principles. The interview process is designed to assess technical fundamentals, business thinking, analytical problem-solving, and alignment with Amazon's customer-obsessed, results-driven culture.
Interview Rounds
Recruiter Screening
What to Expect
Your first conversation with an Amazon recruiter, conducted over the phone or video. This is a conversational, non-technical screening to confirm basics about your background, motivation for the role, and logistical fit. The recruiter will discuss your experience with data tools, familiarity with analytics concepts, availability timeline, and geographic preferences. They will also outline the interview process, answer initial questions about the team and role, and assess your genuine interest in Amazon.
Tips & Advice
Research Amazon's business and recent initiatives before the call. Be enthusiastic and genuine about why you want to work there. Keep your background explanation concise but substantive—highlight any SQL, Python, or analytics experience, even if limited. Ask thoughtful questions about the team, types of projects, tools used, and growth opportunities for junior analysts. Be honest about your skill level; recruiting teams understand junior candidates are still learning. Prepare logistics: confirm your availability for upcoming rounds and any timezone considerations.
Focus Topics
Communication and Collaboration Style
Sharing how you work with team members, your approach to learning from more experienced colleagues, and comfort level with feedback and iteration.
Practice Interview
Study Questions
Motivation and Career Development
Explaining why you want to work for Amazon and in data analytics, your interest in learning new tools and skills, and how this role fits your career path.
Practice Interview
Study Questions
Role Expectations and Junior-Level Responsibilities
Understanding that as a junior analyst, you'll work on data querying, basic dashboard creation, ad-hoc analysis requests, and collaborating with more senior team members—not leading major initiatives.
Practice Interview
Study Questions
Background and Technical Fit
Articulating your foundational SQL, Python, or Excel experience, analytical thinking, familiarity with tools like Tableau or Power BI, and any business domain exposure.
Practice Interview
Study Questions
Technical Phone Screen - SQL and Python
What to Expect
A 45-60 minute phone-based technical assessment using a shared coding platform like CoderPad. You'll solve 2-3 SQL problems of medium difficulty, potentially involving multiple table joins, aggregations, window functions, or data filtering. You may also be asked to write Python code using Pandas to manipulate or analyze data. The interviewer assesses correctness, code clarity, problem-solving approach, and your ability to explain your logic. This round evaluates whether you have the core technical skills needed for the role.
Tips & Advice
Read each problem carefully and ask clarifying questions about the data schema and desired output before coding. Start with a correct, simple solution; optimize only if time permits and interviewer shows interest. Think aloud as you code; silence makes interviewers uncertain about your reasoning. For SQL, trace through join logic step-by-step, test for NULLs and edge cases, and verify your result makes sense. For Python, write readable code with clear variable names. If stuck, articulate your thinking: 'I know I need to X, but I'm not sure of the syntax' is better than silent frustration. For junior levels, correct logic and clear communication matter more than advanced optimization. Ask 'Does this approach make sense?' to get feedback.
Focus Topics
SQL Window Functions and Ranking
Understanding ROW_NUMBER(), RANK(), DENSE_RANK(), running totals using SUM() OVER(), PARTITION BY for segmented calculations, and ORDER BY within window functions.
Practice Interview
Study Questions
Problem-Solving Approach and Communication
Breaking down problems systematically, asking clarifying questions before coding, explaining your approach verbally, thinking through test cases, and articulating your logic clearly.
Practice Interview
Study Questions
SQL Fundamentals - SELECT, WHERE, JOIN
Writing accurate SELECT statements, filtering with WHERE clauses, performing INNER/LEFT/RIGHT/FULL OUTER JOINs correctly, combining results from multiple tables, and understanding ON conditions.
Practice Interview
Study Questions
SQL Aggregations and GROUP BY
Using aggregate functions SUM(), COUNT(), AVG(), MAX(), MIN() appropriately, grouping data with GROUP BY, filtering groups with HAVING, and understanding NULL behavior in aggregations.
Practice Interview
Study Questions
Python Pandas Data Manipulation
Reading data into DataFrames, filtering rows with conditional logic, selecting and renaming columns, using groupby() for aggregation, merging/joining DataFrames, handling missing values with dropna() or fillna().
Practice Interview
Study Questions
Data Case Interview
What to Expect
A 60-minute onsite/virtual interview focused on your ability to structure and solve a business problem using data. You'll receive a realistic Amazon scenario such as 'Analyze why cart abandonment increased last week', 'Evaluate the impact of a new Prime feature', or 'Design metrics to measure customer satisfaction with delivery.' You must clarify ambiguities, define relevant metrics and KPIs, propose data sources and analysis approaches, perform logical analysis, and deliver business insights with actionable recommendations. The interviewer assesses your business thinking, structured problem-solving, analytical reasoning, and ability to connect data to business outcomes.
Tips & Advice
Don't jump into analysis immediately. Spend the first 10-15 minutes asking clarifying questions: What is the business goal? Who are stakeholders? What timeframe are we analyzing? What counts as success? What constraints exist? Define 3-5 key metrics upfront and explain why each matters. Propose data sources and fields you'd query. Use a structured framework: Problem → Hypotheses → Data Collection → Analysis → Insights → Recommendations. For junior analysts, the interviewer values logical thinking and business judgment over mathematical sophistication. Segment analysis by relevant dimensions (product type, customer segment, geography, time). Always connect findings to business impact: revenue, customer experience, operational efficiency. If you don't know something, say 'I'm not sure, but here's how I'd find out' rather than guessing.
Focus Topics
Data Collection and Source Identification
Proposing relevant data tables and fields needed, understanding data structures (fact tables, dimension tables), identifying potential data quality issues or gaps, and suggesting fallback approaches if needed data isn't available.
Practice Interview
Study Questions
Analytical Approach and Hypothesis Formation
Outlining a step-by-step analysis plan, forming hypotheses about likely root causes, proposing segmentation strategies, and explaining how each analysis step builds toward conclusions.
Practice Interview
Study Questions
Insights Communication and Actionable Recommendations
Presenting findings clearly with supporting numbers, highlighting surprising or important insights, connecting data to business impact, and recommending specific, prioritized actions stakeholders can take.
Practice Interview
Study Questions
Metrics and KPI Definition
Identifying 3-5 relevant metrics aligned with the business problem, explaining why each metric matters, understanding what constitutes good performance, and distinguishing leading vs. lagging indicators.
Practice Interview
Study Questions
Problem Clarification and Structured Scoping
Asking targeted questions to understand the business objective, defining success criteria, identifying relevant time periods and customer segments, and determining analysis scope before diving into data.
Practice Interview
Study Questions
Analytics and Experimentation Interview
What to Expect
A 45-60 minute onsite/virtual interview testing your understanding of A/B testing, experimental design, statistical significance, and hypothesis testing. Scenarios might include: 'We're testing a new product recommendation algorithm—how would you measure success?' or 'Our click-through rate experiment showed a 2% improvement with p=0.07—what would you recommend?' You'll discuss experiment design, metrics selection, sample size, test duration, statistical interpretation, and practical decision-making. The interviewer assesses your grasp of core statistical concepts, ability to design sound experiments, and practical judgment about when and how to act on experimental results.
Tips & Advice
Ensure you understand fundamentals: null vs. alternative hypothesis, Type I and Type II errors, p-values (the probability of observing data this extreme if the null hypothesis is true—not the probability the result is 'due to chance'), confidence intervals, and statistical power. For experiment questions, always start by defining the primary metric and explaining its business importance. Discuss how long you'd run the test and why (typically until you reach required sample size or statistical significance). Address that you need to account for multiple testing if dozens of hypotheses are being tested simultaneously. Discuss practical significance: a statistically significant 0.001% improvement might not justify implementation costs. Acknowledge trade-offs: waiting for perfect statistical confidence delays decision-making. For junior levels, sound reasoning and honest acknowledgment of limitations matter more than memorizing formulas.
Focus Topics
Multiple Testing and Practical Experimentation Decisions
Understanding false discovery rates when testing many hypotheses simultaneously, methods for correcting multiple comparisons, and practical judgment about when to act on results despite statistical uncertainty.
Practice Interview
Study Questions
Metric Selection and Validation
Choosing appropriate primary and secondary metrics for experiments, ensuring alignment with business objectives, understanding metric sensitivity, and avoiding gaming or metric manipulation.
Practice Interview
Study Questions
Sample Size and Experiment Duration Planning
Understanding how to calculate required sample size given effect size and desired power, recognizing trade-offs between precision and duration, determining when an experiment has run long enough.
Practice Interview
Study Questions
A/B Testing and Experimental Design Fundamentals
Understanding how to structure A/B tests with control and treatment groups, ensuring random assignment, isolating variables properly, determining test duration and sample size, and avoiding confounding factors.
Practice Interview
Study Questions
P-values, Confidence Intervals, and Statistical Significance
Understanding what p-values represent (not probability the hypothesis is true), interpreting confidence intervals, choosing appropriate significance levels (typically α=0.05), and distinguishing statistical significance from practical significance.
Practice Interview
Study Questions
Product Metrics and Business Acumen Interview
What to Expect
A 45-60 minute onsite/virtual interview evaluating your business acumen, customer understanding, and ability to connect data to strategy. You might be asked: 'What metrics would you track to measure Prime member engagement?', 'Analyze recent changes in customer retention', or 'How would you evaluate if a new checkout feature is successful?' The interviewer assesses your grasp of business fundamentals, ability to think holistically about customer experience, familiarity with Amazon's business model, and skill at communicating technical findings to non-technical partners.
Tips & Advice
Familiarize yourself with Amazon's major business segments (e-commerce retail, marketplace, Prime, AWS) and core business drivers for each. Understand key metrics: customer lifetime value, conversion rates, repeat purchase rates, net retention, net promoter score. When asked about metrics, think holistically across the customer journey: acquire (attract new customers), engage (encourage frequent usage), retain (keep customers coming back), and monetize (profit per customer). For example, cart abandonment analysis isn't just counting abandoned carts—understand why specific customer segments abandon (price sensitivity, shipping time, product selection, etc.). Show you understand Amazon's obsession with customer experience: all metrics ultimately reflect customer satisfaction. For junior analysts, curiosity and asking good follow-up questions is as valuable as having perfect answers. Demonstrate that you think about business impact, not just metrics.
Focus Topics
Funnel Analysis and Conversion Optimization
Analyzing multi-step user journeys (search → product view → add to cart → checkout → purchase), identifying drop-off points, calculating conversion rates at each step, and diagnosing reasons for abandonment.
Practice Interview
Study Questions
Customer Behavior and Lifecycle Analysis
Analyzing customer purchase patterns, browsing behavior, repeat purchase rates, customer segmentation by value or cohort, and understanding customer journey stages from acquisition through retention.
Practice Interview
Study Questions
Business Metrics and KPI Frameworks
Understanding different metric categories (acquisition, engagement, retention, monetization), identifying leading vs. lagging indicators, and setting realistic performance targets.
Practice Interview
Study Questions
Cross-Functional Communication and Stakeholder Management
Translating technical findings into business language for non-technical stakeholders, presenting data insights convincingly, and collaborating with product, engineering, and business teams.
Practice Interview
Study Questions
Amazon Business Model and Key Revenue Drivers
Understanding Amazon's major business segments (retail e-commerce, marketplace, Prime subscriptions, AWS, advertising), how each generates revenue, and what metrics matter most for each.
Practice Interview
Study Questions
Leadership Principles and Behavioral Interview
What to Expect
A 45-60 minute onsite/virtual interview focused on your alignment with Amazon's 16 Leadership Principles and cultural fit. You'll be asked behavioral questions such as: 'Tell me about a time you exceeded expectations', 'Describe a time you had to make a decision with incomplete information', 'Tell me about a failure and what you learned', 'How do you handle disagreement with a colleague?' The interviewer asks follow-up questions to understand your decision-making process, values, and work approach. This round assesses whether you'll thrive in Amazon's results-driven, customer-centric, innovative culture.
Tips & Advice
Prepare 5-7 specific, real examples from your past work or academic projects using the STAR method: Situation (context and challenge), Task (your responsibility), Action (what you did), Result (outcome with numbers/impact when possible). Aim for stories demonstrating different Leadership Principles: leadership (taking initiative), bias for action (moving forward despite uncertainty), customer obsession (focusing on customer needs), deliver results (achieving goals), learn and be curious (growth mindset), frugality (doing more with less), high standards, etc. For junior candidates, interviewers evaluate potential and growth mindset—be comfortable sharing examples where you were still learning. Avoid rehearsed-sounding generic answers; use real stories with specific details. If asked about something you haven't experienced, explain your principles and how you'd approach it. Be honest and thoughtful rather than trying to 'say what they want to hear.' Remember, interviewers assess whether you'll grow successfully as part of the team.
Focus Topics
Working with Incomplete Information and Ambiguity
Describing situations where you had to make decisions with missing data, how you made reasonable assumptions, moved forward despite uncertainty, and validated assumptions as information became available.
Practice Interview
Study Questions
Collaboration, Communication, and Cross-Functional Teamwork
Examples of effectively working with people from different backgrounds and roles (engineers, product managers, finance), explaining complex ideas to non-technical audiences, and resolving disagreements constructively.
Practice Interview
Study Questions
Growth Mindset and Learning from Failure
Sharing specific examples of mistakes or failed projects, what you learned, how you applied those lessons to future work, and how you've developed your skills over time.
Practice Interview
Study Questions
Amazon Leadership Principle: Customer Obsession
Demonstrating deep focus on customer needs and satisfaction, understanding customer problems more deeply than customers understand them themselves, and making decisions with customer impact foremost.
Practice Interview
Study Questions
Amazon Leadership Principle: Deliver Results
Taking ownership of projects, maintaining high standards, achieving goals despite obstacles, following through on commitments, and not accepting mediocrity.
Practice Interview
Study Questions
Frequently Asked Data Analyst Interview Questions
You are modeling clicks in a newsletter product. Each user receives 10 independent emails and each email has probability p = 0.3 of being clicked. (a) What is the probability that a user clicks at least 3 emails? (b) Compute the expected number of clicks and the variance. Show formulas and numeric answers.
Sample Answer
Quick answer
Each user receiving 10 independent emails, each clicked with probability p=0.3, is a Binomial(n=10,p=0.3) model. The probability of at least 3 clicks is easiest to get via the complement of 0, 1, or 2 clicks, which comes out to about 61.7%. The expected number of clicks is np=3, with variance np(1−p)=2.1.
Setup
X∼Binomial(n=10, p=0.3), with PMF:
P(X=k)=(k10)(0.3)k(0.7)10−k(a) P(X≥3)
Computing the complement is less arithmetic than summing 8 terms directly:
P(X≥3)=1−[P(X=0)+P(X=1)+P(X=2)]from math import comb
n, p = 10, 0.3
p0 = comb(n, 0) * p**0 * (1 - p)**10
p1 = comb(n, 1) * p**1 * (1 - p)**9
p2 = comb(n, 2) * p**2 * (1 - p)**8
p_ge3 = 1 - (p0 + p1 + p2)
print(f"P(X=0)={p0:.6f}, P(X=1)={p1:.6f}, P(X=2)={p2:.6f}")
print(f"P(X>=3)={p_ge3:.4f}")
# P(X=0)=0.028248, P(X=1)=0.121061, P(X=2)=0.233474
# P(X>=3)=0.6172
P(X≥3)≈0.6172: roughly 61.7% of users click at least 3 of the 10 emails.
(b) Expected value and variance
For a Binomial random variable:
E[X]=np,Var(X)=np(1−p) E[X]=10×0.3=3,Var(X)=10×0.3×0.7=2.1Standard deviation =2.1≈1.449.
Interpretation
An average user clicks 3 of the 10 emails, with a standard deviation of about 1.45 clicks, so a typical user's click count lands somewhere between about 1.5 and 4.5. The fact that over 60% of users clear the "at least 3" bar despite the average also being 3 reflects the right-skew-free, moderately spread-out shape of this particular Binomial (n=10, p=0.3 isn't close enough to either 0 or 1 to be heavily skewed).
Trade-offs and pitfalls
- Independence across the 10 emails is the load-bearing assumption. If a user who clicks one email is more likely to click the next (engagement momentum) or less likely (fatigue), the true distribution is overdispersed or underdispersed relative to Binomial, and the variance formula above will be wrong.
- p=0.3 is itself an estimate, not a known constant. In practice p is estimated from historical click data, and the Binomial calculation above doesn't account for uncertainty in that estimate; a more careful treatment would put a Beta prior on p and integrate over it (a Beta-Binomial), widening the resulting probability estimates.
Users can belong to multiple overlapping behavioral segments at once, for example power users, mobile-only users, and users acquired through a specific channel. Describe how you would analyze feature adoption and attribute impact to a segment when overlaps like this exist, and what analytical approaches help isolate a single segment's effect.
Sample Answer
Direct answer
When a user can belong to several behavioral segments at once, such as being a power user, a mobile-only user, and a member of a specific acquisition channel simultaneously, attributing a feature's adoption impact to any single segment requires either analyzing the segments' intersections directly or using a modeling approach that can separate overlapping effects, rather than reporting each segment's adoption rate independently as if the segments did not overlap.
Structured elaboration
The simplest approach is to build an intersection table: instead of reporting adoption for "power users" and "mobile-only users" as two separate rows, report adoption for each meaningful combination (power users who are also mobile-only, power users who are not mobile-only, and so on), which makes any interaction between the segments visible rather than hidden inside two overlapping averages. This works well when there are only a handful of segments and their combinations remain large enough to be statistically meaningful, but it breaks down quickly as more segments are added, since the number of combinations grows multiplicatively while each combination's sample size shrinks.
For a larger number of overlapping segments, a regression-style approach, where segment membership is entered as a set of indicator variables and the model estimates each segment's association with the outcome while holding the others constant, isolates each segment's apparent effect net of the others in a way a simple table cannot. This is still an associational, not necessarily causal, estimate unless segment membership is itself randomized or quasi-randomized, so a genuinely causal claim about a segment's effect on adoption typically requires an experiment where the feature is deliberately varied within a segment while holding the other segment memberships as similar as possible between the exposed and unexposed groups.
Worked example
Consider a feature rollout where adoption looks strong overall (35%) and looks especially strong among "power users" (60% adoption) and among "mobile-only users" (52% adoption) taken separately. If power users and mobile-only users overlap heavily, say 70% of power users are also mobile-only, a naive read might credit the feature with independently winning over two different audiences, when in fact a regression controlling for both segment memberships at once might show that being mobile-only carries almost no independent association with adoption once power-user status is accounted for, meaning the apparent "mobile-only effect" was really being driven by the fact that power users happen to skew heavily mobile-only, not by anything specific to the mobile-only experience.
Trade-offs and pitfalls
The main pitfall is exactly the scenario above: reporting overlapping segments' adoption rates independently and drawing two separate causal-sounding conclusions from what is really one underlying effect appearing twice. A second pitfall specific to the regression approach is that it can only control for the segments actually included as variables, so an unmeasured factor correlated with both segment membership and adoption (a confound not represented in the model) can still distort the isolated estimates, which is why a genuine causal claim ultimately needs an experiment rather than segment-level regression alone.
Define the novelty effect and the primacy effect in the context of a multi-week online experiment: what causes each, and in which direction does each bias an early readout? Describe the visualizations, models, or statistical checks you would use to tell a genuine, persistent treatment effect apart from a temporary novelty spike or a fading resistance-to-change effect, and explain how you might adjust the experiment's duration or analysis to account for it.
Sample Answer
Direct answer
A novelty effect is a temporary inflation of an early treatment effect: users explore or click on something purely because it is new, and that extra engagement fades once the feature stops being novel, biasing an early readout upward. A primacy effect (sometimes called a change-aversion or resistance-to-change effect) is the opposite pattern: a change disrupts a habitual workflow, so users are temporarily worse off while they relearn it, biasing an early readout downward, then the effect climbs toward its true level as users adapt. Both biases fade over roughly the same kind of horizon, so trusting a week-one number without checking its trajectory can make you launch a fad or kill a genuine win too early.
Structured elaboration
Mechanism and direction
| Effect | What drives it | Bias on early readout | What happens over time |
|---|---|---|---|
| Novelty | Curiosity, exploration of something unfamiliar | Overstates the true effect | Decays toward the persistent effect |
| Primacy / resistance to change | Habit disruption, relearning cost | Understates the true effect | Grows toward the persistent effect |
Diagnostics to tell a spike from a persistent effect
- Time-windowed effect plot: daily or weekly treatment effect with confidence intervals, ideally with a smoothed trend line (LOESS or a spline), not a single pooled average. A genuine effect looks like a roughly flat band around a nonzero value; novelty looks like a spike that decays toward that band; primacy looks like a trough that rises toward it.
- Exposure-age cohorts, not calendar time: plot the effect against days since each user's first exposure for a fixed cohort of users first exposed on the same day, rather than calendar date. A calendar-time plot mixes newly exposed users (still novel-biased) with long-exposed users (already stabilized) every single day, which can mask a real decay curve as a flat line.
- New vs. returning user split: novelty is usually concentrated in users encountering the feature for the first time; if the effect is similar in a segment already exposed for weeks, that argues against novelty as the explanation.
- Change-point or decay model on the daily series: fit a time-varying effect model, effect as a function of exposure age, and test whether the transient component is statistically distinguishable from zero, separately from the asymptotic (persistent) component.
- Placebo check: run the same time-windowed analysis on a pre-launch period with no real treatment; if spike-like patterns appear there too, the "decay" you see in the real experiment may just be normal week-to-week noise, not a novelty artifact.
Adjusting duration and analysis
- Pre-register the analysis window before launch rather than reading the metric the moment it looks good; a fixed rule such as "primary read is the average effect over exposure-days 21 to 35" prevents cherry-picking the peak or the trough.
- Extend the experiment until the exposure-age curve visibly plateaus, or the fitted transient component's confidence interval crosses zero, rather than for a fixed calendar duration chosen in advance.
- Report both the early-window and late-window effect side by side rather than a single blended number; a launch decision based only on the blended average silently averages a fading spike with a stabilizing floor.
Worked example
Two hypothetical (illustrative, not real study data) weekly average-treatment-effect readings for the same nominal conversion metric:
| Week | Novelty-pattern experiment | Primacy-pattern experiment |
|---|---|---|
| 1 | +9.0% | -3.0% |
| 2 | +5.0% | +0.5% |
| 3 | +3.2% | +2.6% |
| 4 | +2.5% | +3.4% |
Both curves are converging toward roughly the same persistent level, one from above and one from below, which is exactly the signature that separates them from a flat, genuine effect that would show roughly the same number every week within noise.
If the transient component decays exponentially, Δ(t)=C+Ae−λt, where A is the size of the initial novelty or primacy spike above the persistent effect C (the extra amount present at t=0 that fades away over time), and the illustrative decay rate is λ=0.2 per week, its half-life is:
t1/2=λln2=0.20.693≈3.5 weeks
That is the kind of number worth pre-registering as a decision rule: run at least three half-lives (about 10 to 11 weeks here) before reading the persistent effect C, rather than picking an arbitrary duration.
Trade-offs and pitfalls
- Waiting out a full decay curve costs calendar time and opportunity cost on other experiments; for low-stakes features, teams sometimes accept the risk of a novelty-inflated launch decision rather than run for months.
- Segmenting by exposure age needs per-user first-exposure timestamps captured in the assignment log; if you only log calendar-date rollups, you cannot separate calendar effects from exposure-age effects after the fact.
- A curve that looks like decay can just as easily reflect unrelated seasonality (marketing pushes, holidays) that correlates with launch timing; a decay-shaped curve is suggestive, not conclusive, on its own.
- Don't assume every early spike is novelty and every early trough is resistance to change: an early spike can be a genuine effect solving a pent-up need immediately, and an early trough can be a real bug that later gets patched. The pattern is evidence, not proof, and should be paired with qualitative checks (support tickets, session recordings) before concluding the mechanism.
Finance wants a month-to-date revenue trend by product from a daily sales fact table, but some product-day combinations are missing because there were no sales. The report still needs to show zero-revenue days and reset correctly at each month boundary. How would you structure the query and what reference data, if any, would you need?
Sample Answer
Approach
I would build a date spine, which is a table of every calendar date in the reporting range, then cross join it to the product list. That guarantees zero-sales days are present. After that, I would left join the daily sales fact and use a running sum partitioned by product and month.
WITH spine AS (
SELECT d::date AS dt
FROM generate_series(date '2025-01-01', date '2025-01-31', interval '1 day') AS g(d)
), daily AS (
SELECT product_id, sale_date, SUM(revenue) AS revenue
FROM sales_fact
GROUP BY product_id, sale_date
), base AS (
SELECT p.product_id, s.dt
FROM products p
CROSS JOIN spine s
)
SELECT
b.product_id,
b.dt,
COALESCE(d.revenue, 0) AS revenue,
SUM(COALESCE(d.revenue, 0)) OVER (
PARTITION BY b.product_id, DATE_TRUNC('month', b.dt)
ORDER BY b.dt
) AS mtd_revenue
FROM base b
LEFT JOIN daily d
ON d.product_id = b.product_id
AND d.sale_date = b.dt;
Reference data needed
- A product dimension.
- A calendar or date spine table, or a generated date series.
Why it works
Partitioning by month resets the running total at each boundary, and the spine ensures missing product-day combinations still show as zero.
Tell me about a time you had to escalate a stakeholder conflict to leadership because the people involved could not agree on priorities themselves. What made you decide to escalate rather than keep working it peer to peer, and how did you frame the ask to leadership?
Sample Answer
Direct answer
Escalating a stakeholder conflict to leadership is the right call when peer-level resolution has genuinely been tried and failed, the disagreement is actively blocking meaningful progress, and the decision at stake is significant or hard to reverse; framing the escalation as a request for a decision rather than a complaint about either party is what makes it land well.
Structured elaboration
- What made escalation the right call, not just an easier one. A real attempt at resolving the disagreement directly should precede escalation; the deciding factor is usually that continued peer-level effort was unlikely to converge and the cost of continued delay was rising.
- How the ask to leadership was framed. Presenting the situation neutrally, with both sides' reasoning represented fairly, and asking specifically for a decision on a defined question, rather than asking leadership to referee who's "right," keeps the conversation focused on unblocking progress.
- What leadership needed to make a good call. A concise summary of the disagreement, what was tried, the trade-offs of each option, and a clear ask (a decision, a resource, an explicit priority call) gives leadership what they need without requiring them to relitigate the whole history.
- What happened afterward. Documenting the resolution and communicating it back to both original parties closes the loop, so the escalation doesn't leave lingering resentment about how it was handled.
Worked example
Two teams couldn't agree on which of two conflicting priorities to pursue with shared, limited resources, and each had reasonable grounds for their position. After a joint conversation failed to converge over several days while the clock on both timelines kept running, escalating with a short written summary presenting both positions fairly, the trade-offs of each, and an explicit request for a priority call, let leadership make a fast, informed decision rather than re-litigating the underlying technical debate themselves.
Trade-offs and pitfalls
An escalation framed even slightly as blame-assigning, rather than decision-seeking, tends to put leadership in the position of managing your relationship with the other party instead of making the actual call needed, which is a worse outcome for everyone involved.
You need to compute user-level monthly revenue where some orders are refunded later. Propose a reproducible approach to attribute refunds: should refunds be subtracted from the month of original purchase, the refund date, or both? Explain trade-offs and how to implement each choice in your ETL.
Sample Answer
Direct answer: Attribute the refund to the ORIGINAL purchase month by default (so a month's revenue reflects net revenue for purchases made that month, a "vintage" view), and additionally expose a refund-date view for operational/cash-flow purposes; doing both, clearly labeled, resolves the trade-off rather than forcing a single choice that serves one audience and misleads another.
Structured elaboration:
- Attribute to original purchase month (vintage/net-revenue view): answers "how much revenue did purchases made in June ultimately generate, after all refunds," which is the more meaningful number for evaluating a specific month's SALES quality and for financial metrics like LTV that need to reflect true net value per acquisition cohort. Cost: this view changes RETROACTIVELY as later refunds come in, so "June's revenue" reported today may differ from "June's revenue" reported a month from now as more refunds land, which needs to be documented as an expected property of this view, not a bug.
- Attribute to refund month (cash/operational view): answers "how much net cash moved this month," which is what an operational cash-flow dashboard cares about; this view is stable once a month closes (refunds affect the month they occur in, not a past month), but conflates "how good was June's sales" with "how much refund activity happened in whatever month that activity landed."
- Recommendation: implement BOTH as separate, clearly named metrics (
monthly_revenue_by_purchase_vintagevsmonthly_net_cash_by_transaction_month) rather than picking one and hoping it serves every audience; most disputes here come from two teams silently assuming different conventions while calling the result by the same ambiguous name ("monthly revenue").
Worked example: a $100 purchase in June refunded in August: the vintage view attributes -$100 back to June (so June's TRUE net revenue, once fully settled, is 0 for that purchase), which is the right number for evaluating June's cohort quality; the cash view attributes -$100 to August (June showed +$100 at the time, August shows the -$100 offset), which is the right number for August's actual cash-flow statement.
Trade-offs & pitfalls: The vintage view requires the ETL to support RETROACTIVE updates to a previously-published month's number as refunds continue arriving (which needs the same versioned/data_version discipline discussed for other retroactively-adjusted metrics in this topic, so consumers can tell a "final" June number from a "still settling" one); implementing the vintage view without that retroactive-update discipline, and instead freezing June's number the day the month closes, silently produces an inaccurate vintage number that never gets corrected, which is arguably worse than not offering the vintage view at all.
You need to load a CSV with a 'date' column that contains values like '2021-12-31', '31/12/2021', and some malformed entries. Write Python/pandas code to read the CSV and parse the dates into a single timezone-aware datetime column in UTC; invalid parses should become NaT. Also explain how you would detect ambiguous formats like '01/02/2021'.
Sample Answer
Direct answer
Read the date column as plain strings (never let pandas guess the format), try an explicit ISO parse first, fall back to a day-first parse with errors='coerce' for whatever the ISO pass missed, and localize the whole result to UTC (Coordinated Universal Time). Detecting an ambiguous format like "01/02/2021" is a separate check: flag any D/M/Y-shaped string where both the first and second numbers are 12 or less, since either reading is grammatically valid.
Approach
- Read the column as
dtype=strso pandas does not silently infer a format on read. - Flag ambiguous strings with a regex plus a numeric check (both candidate day and month values in 1..12).
- Parse with an explicit ISO
format="%Y-%m-%d"first; anything that fails becomes NaT, not an exception. - Re-parse only the rows that failed ISO parsing, this time with
dayfirst=Trueto correctly read "31/12/2021"-style strings; still coerce failures to NaT. - Combine the two parses and localize to UTC.
Worked example
import re
import pandas as pd
df = pd.DataFrame({
"date": ["2021-12-31", "31/12/2021", "01/02/2021", "not-a-date", None],
})
s = df["date"].astype(str).str.strip()
ambig_pattern = re.compile(r"^(\d{1,2})[\/\-](\d{1,2})[\/\-]\d{2,4}$")
def is_ambiguous(date_str):
if not isinstance(date_str, str):
return False
m = ambig_pattern.match(date_str)
if not m:
return False
d, mo = int(m.group(1)), int(m.group(2))
return 1 <= d <= 12 and 1 <= mo <= 12
df["date_ambiguous"] = s.apply(is_ambiguous)
parsed_iso = pd.to_datetime(s, format="%Y-%m-%d", errors="coerce", utc=True)
mask_missing = parsed_iso.isna()
parsed_dayfirst = pd.to_datetime(s[mask_missing], dayfirst=True, errors="coerce", utc=True)
parsed = parsed_iso.copy()
parsed.loc[mask_missing] = parsed_dayfirst
df["date_parsed_utc"] = parsed
df["date_parse_failed"] = df["date_parsed_utc"].isna()
print(df)
Output (verified against pandas 3.0.3):
date date_ambiguous date_parsed_utc date_parse_failed
0 2021-12-31 False 2021-12-31 00:00:00+00:00 False
1 31/12/2021 False 2021-12-31 00:00:00+00:00 False
2 01/02/2021 True 2021-02-01 00:00:00+00:00 False
3 not-a-date False NaT True
4 NaN False NaT True
"01/02/2021" is correctly flagged date_ambiguous=True (both 01 and 02 are valid day-or-month values) and, absent other context, is parsed day-first as February 1st, which the ambiguity flag exists precisely to call out for review. "31/12/2021" is unambiguous (31 cannot be a month) and needs no flag.
Key points
- Reading with
dtype=strand parsing explicitly (rather thanpd.read_csv(..., parse_dates=['date'])) keeps control of exactly which format is tried in which order, which matters when the column mixes formats. - The ambiguity check and the actual parse are independent: the parse always produces a best-effort answer (or NaT), while the ambiguity flag is a signal for a human to double-check specific rows, not a gate on parsing.
errors='coerce'at each stage means a malformed row never crashes the whole batch; it becomes NaT and is visible indate_parse_failed.
Complexity
Two vectorized pd.to_datetime passes, each O(n), plus one Python-level .apply() for the ambiguity check, which is O(n) but with a much larger per-row constant since it runs a compiled regex through the Python interpreter row by row rather than in pandas' vectorized layer; for very large data, .str.extract with a compiled pattern replaces .apply(is_ambiguous) at some cost in readability. Memory: two full-length parsed Series are held simultaneously before being combined, plus the boolean flag columns.
Edge cases
- Fully missing values (
None/NaN): in pandas 3.0, string columns default to the new string dtype rather than the old object dtype, and a missing value in that column stays a real missing value through.astype(str)rather than becoming the literal text "None." A row-wise function likeis_ambiguousthat assumes it always receives a string will raiseTypeError: expected string or bytes-like object, got 'float'on such a row; guard with anisinstance(date_str, str)check before matching, as shown above. This is a genuine pandas 3.0 currency trap: code that worked under the old object-dtype default can break silently (well, loudly, via a TypeError) once run against the new default string dtype. - Malformed strings that match no format: land as NaT after both parse attempts and are visible via
date_parse_failed. - True ambiguity with no way to resolve it from the string alone: the flag surfaces these; resolving them (correctly) requires outside context (a known source locale, a paired timestamp field), not a smarter regex.
Trade-offs and pitfalls
- Letting
pd.read_csvauto-infer the date format is convenient but silently picks one interpretation for ambiguous rows with no flag and no way to know afterward which rows were guessed; explicit, staged parsing costs a few more lines but makes every guess visible and auditable.
Explain SQL's three-valued logic (TRUE, FALSE, UNKNOWN). Provide a truth table for comparisons involving NULL, and show why WHERE NOT (col = 'a') does not select rows where col IS NULL. How do you rewrite a predicate to include NULLs explicitly?
Sample Answer
SQL predicates don't just evaluate to TRUE or FALSE; a third state, UNKNOWN, appears whenever a comparison involves NULL, and a WHERE clause only keeps rows where the predicate is TRUE (UNKNOWN rows are dropped, just like FALSE ones).
Structured elaboration
Truth table for col = 'a' and its negation, across the three column states:
| col value | col = 'a' | NOT (col = 'a') |
|---|---|---|
| 'a' | TRUE | FALSE |
| 'b' | FALSE | TRUE |
| NULL | UNKNOWN | UNKNOWN |
The key insight: NOT UNKNOWN is still UNKNOWN, not TRUE. So WHERE NOT (col = 'a') does NOT select the NULL row, even though intuitively "not equal to a" feels like it should include "unknown, so possibly not a". If you want NULLs included in a "not equal to" filter, you have to say so explicitly: WHERE NOT (col = 'a') OR col IS NULL.
Worked example
Given t(col) with rows 'a', 'b', NULL: evaluating col = 'a' gives TRUE, FALSE, and NULL (SQLite/most engines represent UNKNOWN as NULL in a SELECT list) for the three rows respectively; NOT (col = 'a') gives FALSE, TRUE, and NULL. A WHERE clause on either predicate keeps only the TRUE row(s), silently dropping the NULL row from both.
Trade-offs and pitfalls
Three-valued logic is the root cause behind several other gotchas covered separately (NOT IN with NULL, = NULL returning nothing); understanding it as one unifying concept, rather than memorizing each symptom separately, is what separates a senior explanation from a list of "gotchas I've been bitten by".
Propose a segmentation strategy to analyze funnel performance. List eight segments (for example acquisition channel, device, geography, cohort age, plan type, referral status, campaign tag, feature-flag), state a hypothesis for how each segment might impact conversion, and name one KPI per segment to monitor.
Sample Answer
Direct answer
A blended, whole-funnel conversion rate can be flat or improving while a specific segment is quietly getting worse, or a change can help one segment and hurt another in ways that cancel out in the aggregate; segmentation is what makes those cases visible. The strategy below covers eight segments (acquisition channel, device, geography, cohort age, plan type, referral status, campaign tag, feature flag), a specific, falsifiable hypothesis for how each might affect conversion, and one KPI (key performance indicator) to monitor per segment.
Structured elaboration
Why segmentation matters, concretely. Two quick examples make the point before the full strategy: a redesigned checkout page might raise the OVERALL conversion rate while quietly making mobile checkout worse, if desktop's larger improvement masks a smaller mobile regression in the blended number, only a device-segmented view catches this. Separately, a marketing campaign might report a healthy overall conversion rate while actually converting referred and organic users well and paid-display users very poorly, with the poor-performing segment's low volume hiding inside a decent-looking blended average; only a channel-segmented view surfaces which spend is actually working.
The eight segments, each with a hypothesis and a monitoring KPI:
| Segment | Hypothesis: how it might impact conversion | KPI to monitor |
|---|---|---|
| Acquisition channel | Organic and referral traffic arrives with pre-existing intent and converts better than paid-display traffic, which is often interrupting rather than intent-driven | Conversion rate by channel |
| Device | Mobile users convert at a lower rate than desktop specifically on multi-field, data-entry-heavy steps, due to smaller screens and higher input friction | Step-completion rate by device type |
| Geography | Conversion rate varies by region due to differences in available payment methods, localization quality, and price sensitivity, with drop concentrated at the payment step in underserved regions | Payment-step conversion rate by country/region |
| Cohort age | The longer a user goes without converting after entering the funnel, the less likely they are to ever convert, an "intent decay" effect distinct from any single step's friction | Conversion rate as a function of days-since-entry (a cohort-age curve) |
| Plan type | Users evaluating a higher tier or enterprise plan take longer to decide and show a lower raw conversion rate but a higher eventual deal value than self-serve users, reflecting a longer real evaluation cycle rather than more friction | Median time-to-conversion by plan tier |
| Referral status | Users referred by an existing user convert at a higher rate than non-referred users, because trust transferred from the referrer substitutes for some of the evaluation the funnel would otherwise need to do | Conversion rate, referred vs. non-referred |
| Campaign tag | Different campaign creatives set different expectations, so a campaign whose messaging overstates the product can drive high click-through but LOWER downstream conversion once users hit the actual experience, an expectation-mismatch effect | Conversion rate by campaign tag, alongside click-through rate for contrast |
| Feature flag | Users exposed to a flagged experience (a redesigned onboarding, a new form layout) convert at a different rate than the control, either because the change reduces real friction or introduces an unintended regression | Conversion rate, flag-on vs. flag-off (holding all other segments constant) |
Worked example
Take the campaign-tag segment as a concrete walk-through, since expectation mismatch is the least obvious of the eight hypotheses. A campaign advertising "instant setup" drives a large volume of clicks (high click-through rate) but underperforms on actual signup completion relative to a lower-click-through campaign advertising the product more literally, because users who clicked expecting a near-instant flow abandon as soon as they hit a multi-step setup process that does not match what the ad promised. Monitoring conversion rate ALONGSIDE click-through rate by campaign tag is what surfaces this: a campaign with high clicks and low conversion is a different problem (fix the ad copy, or fix the onboarding flow it is setting expectations for) than a campaign with low clicks and high conversion (the audience or channel targeting needs work, not the funnel itself). Reading conversion rate alone, without the click-through context, cannot distinguish these two very different diagnoses.
Trade-offs and pitfalls
- Segment interactions matter and single-dimension segmentation can hide them. A device effect might only really be a MOBILE-PLUS-PAID-CHANNEL effect (mobile users from paid campaigns specifically underperform, while mobile users from organic search do fine); segmenting on device alone and segmenting on channel alone can each look unremarkable while the intersection hides a real, fixable problem. Once a single-dimension segment looks flat but a hypothesis suggests an interaction might be at play, check the two-way cross-tab before concluding there is nothing there.
- Common mistake: treating every observed segment difference as something to "fix," rather than checking whether it reflects a genuine, fixable friction versus an expected, non-fixable population difference (enterprise-plan users SHOULD take longer to convert than self-serve users; that is not a bug in the funnel, it is a real difference in the decision being made).
- Segment sample size discipline. A segment with too little volume (a niche geography, a narrow campaign tag) produces a noisy conversion-rate estimate that can look dramatically different from the blended average purely from sampling variation; before treating a small segment's number as a real signal, check whether the segment has enough volume for the comparison to be meaningful, the same discipline a proper A/B test applies to its own sample-size planning.
- Pre-register which segments matter before looking, where possible. Segmenting exhaustively across many dimensions and reporting only the one that happens to look interesting is a version of the multiple-comparisons problem: with enough segments checked, SOME of them will show an apparently interesting difference by chance alone. The eight hypotheses above are useful specifically because each one is stated as a falsifiable claim BEFORE looking at the data, not discovered by mining for whichever cut looks most dramatic after the fact.
Case: Post major launch, NPS is mixed, support tickets rose, but sales signals look healthy. You have limited telemetry. Produce a strategic analysis plan: what data to collect, short experiments to run, scenario planning for product changes, and criteria for go/no-go decisions.
Sample Answer
What data to collect first, given limited telemetry, prioritized by what's cheapest to get:
- Categorize the existing support tickets by root cause, bug, confusion or UX friction, or missing feature, using the ticket text you already have. This alone often explains a mixed NPS (Net Promoter Score, a customer loyalty metric typically ranging from -100 to 100, based on how likely customers are to recommend the product) without needing any new instrumentation.
- Pull the actual free-text comments behind the NPS scores, not just the numeric score, segmented by score band and by whether the respondent also filed a support ticket.
- Add two or three targeted funnel events to close a specific blind spot, for example first-use completion or feature discovery, deployable in days, not a full telemetry overhaul.
- Segment the sales signal itself: confirm whether "healthy sales" means new-customer acquisition, which doesn't yet reflect the launch experience, or existing-customer expansion and renewal, which would. Conflating the two is a common analysis mistake that can make the picture look more consistent than it is.
Short experiments to run:
- A small usability test, five to eight users, on the specific flow the support tickets cluster around, cheap and fast, days not weeks, to turn "tickets are up" into a specific, fixable cause.
- A lightweight in-product micro-survey triggered right after the friction point the tickets point to, to get a quick directional read on whether it's a widespread problem or a vocal minority.
Scenario planning for product changes, three branches based on what the above reveals:
- If the cause is a specific, fixable bug or UX gap with isolated blast radius: ship a targeted fix, no rollback needed, and confirm the ticket category drops afterward.
- If the cause is a genuine design mismatch for a meaningful segment that a quick patch can't fix: add an opt-out or legacy path for that segment sized to how large it actually is, while iterating on the new design.
- If the signal turns out to be a vocal minority concentrated in a small, low-value segment while the broader base is fine: make no major product change, close the specific gaps raised, and treat the sales signal as the stronger read, since it reflects a broader population than survey respondents typically do.
Criteria for go or no-go on rolling the launch back: don't use a single blanket threshold. Roll back only if the launch-caused ticket category stays above a sustained multiple of its pre-launch baseline, for example more than 3 times baseline sustained for two weeks, and it's concentrated among customers near a renewal decision, the highest-stakes segment, and no fix is deployable within that renewal window. Otherwise, keep the launch live and iterate, because rolling back a major launch has its own real cost, re-migration, team morale, lost momentum, and reacting to the loudest signal, support tickets, when it isn't necessarily the most representative one, is the exact bias this criteria set is meant to guard against.
Search Results
AMAZON Data Analyst Interview Questions 2025 - ForumDE
Master your Data Analyst interview prep with 25 essential questions covering SQL, Python, Excel, Power BI, A/B testing, and Amazon-style ...
Top 10 Amazon Data Analyst Interview Questions
1. How would you approach analyzing customer behavior data to improve Amazon's recommendation system? · 2. Describe a time when you had to ...
Amazon Data Scientist Interview Guide (27 Questions Asked in 2025)
Tell me about a time when you had to make a decision based on incomplete or ambiguous data. · Can you describe a challenging project you worked ...
Amazon Data Analyst Interview: Your Complete Guide to Acing ...
Tell me about a time when you exceeded expectations during a project. What did you do, and how did you accomplish it? Amazon values bias for ...
Amazon SQL Interview Question 2025 | Sr. Business Analyst
Get this question https://github.com/najirh/sql-advanced-problems/tree/main/vid1 In this video, I walk through a step-by-step solution to a ...
This interview preparation guide was generated using AI-powered research from the sources listed above. While we strive for accuracy, we recommend verifying critical information from official company sources.
Want to create your own tailored preparation guide using our deep research?
Get Started for FreeInterview-Ready Courses
Visual-first, interactive, structured learning paths