Amazon·Data Scientist·Technical Phone Screen
Jun 2026
SQL-heavy technical screen for a Data Scientist role at Amazon. Every question was hands-on MySQL with specific schema and expected output shapes, no fluff, no behavioral stuff at all. Felt more like a database engineer interview than a data science one, which I wasn't fully prepared for.
- Explain LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN, and CROSS JOIN in terms of set semantics and duplicate handling. Then write each join type across two given tables (emulating FULL OUTER JOIN in MySQL), give exact row counts, list the first three rows in a specified order, and explain how NULLs affect equality joins.
- For each of five given SELECT queries over a table with GROUP BY, HAVING, and aliases, determine whether the query executes or errors under MySQL's ONLY_FULL_GROUP_BY mode, and if it errors, state the exact reason.
- Write a single query returning every user with their order count and total spend in dollars (two decimal places), including users with zero orders, sorted by total spend descending then user_id ascending.
- Using only integer arithmetic (no loops or UDFs), write a SELECT that converts a duration_seconds column into a human-readable string in the format 'X days Y hours Z minutes W seconds'.
- Using a sessions table with login and logout timestamps, write a query returning session duration as both a TIME value and an integer seconds count using TIMEDIFF and TIME_TO_SEC, excluding rows where logout_at is NULL. Also explain how the query changes if NULL logout_at should be treated as the current time.
“This is where I lost the most time.” The rest of the author's notes on Data Scientist interview at Amazon, Technical Phone Screen round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post