Data Scientist Data Manipulation (SQL/Python) Interview Questions

Practice 550 real Data Manipulation (SQL/Python) interview questions for Data Scientist roles. From companies including Meta, Amazon, TikTok, Capital One, DoorDash.

550 Questions 84 Companies08.03.2026
Showing 20 results
Role
Two Sigma logo
Two Sigma
Medium
Data Scientist

Analyze NYC taxi trips efficiently over last 7 days

Use today = 2025-09-01. Consider NYC taxi trip data over the last 7 days inclusive (2025-08-26 to 2025-09-01, America/New_York). You receive two datas...

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

Write SQL to rank advertisers and profitability

You are given two denormalized tables. Use ANSI SQL (CTEs allowed) and UNPIVOT (or an equivalent UNION ALL approach if UNPIVOT is unavailable). Table:...

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

Aggregate D1 retention cohorts in SQL

Today is 2025-09-01. Using SQL (optionally outline a pandas approach too), compute daily engagement and D1 retention for the last 7 days (2025-08-26 t...

Data Manipulation (SQL/Python)
10
0
131 people solved
Oct 13, 2025
Roku logo
Roku
Medium
Data Scientist

Write SQL for profit, growth, retention

Write ANSI-SQL (PostgreSQL preferred) for the tasks below. Assume all timestamps are UTC and that "today" = 2025-09-01. Schema: - products(product_id ...

Data Manipulation (SQL/Python)
6
0
93 people solved
Oct 13, 2025
Gemini logo
Gemini
Medium
Data ScientistSenior+

Write SQL/Python for ACH fraud analytics

As of today (2025-09-01), use the following schema and tiny samples to answer. Provide SQL for the SQL parts and Python for the Python part. Schema - ...

Data Manipulation (SQL/Python)
4
0
50 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Analyze video flags and reviews with SQL

You are designing SQL queries for YouTube Trust & Safety. Use the schema and sample data below. Unless stated otherwise, treat a flag as reviewed if t...

Data Manipulation (SQL/Python)
28
2
244 people solved
Oct 13, 2025
Meta logo
Meta
Medium
Data Scientist

Build DiD dataset with SQL

Using the schema and sample data below, write SQL to build an individual-day panel suitable for staggered-adoption DiD of the shuttle’s effect on part...

Data Manipulation (SQL/Python)
4
0
56 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Write SQL/Python for messy event data

Using the schema and sample data below, write: (1) a single SQL query to compute daily metrics for the local date 2025-09-01 in America/Los_Angeles, a...

Data Manipulation (SQL/Python)
3
0
27 people solved
Oct 13, 2025
Meta logo
Meta
Medium
Data Scientist

Write SQL to analyze group-call concurrency

You are given call data and must compute group-call metrics. Schema (timestamps are UTC): Tables: - calls(call_id INT PRIMARY KEY, host_user_id INT, s...

Data Manipulation (SQL/Python)
1
0
9 people solved
Oct 13, 2025
Snapchat logo
Snapchat
Medium
Data Scientist

Compute same-day acceptance metrics last week

Assume today is 2025-09-01; interpret 'last week' as 2025-08-25 through 2025-08-31 inclusive, using UTC dates. You have the following schema and sampl...

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

Append country tables and rank salaries in USD

You have separate country-level employee tables that must be appended and ranked by salary converted to USD using an exchange rate table. SQL schema a...

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

Calculate survey response and quality metrics in SQL

Compute survey response-rate and quality metrics from event data. Assume "today" = 2025-09-01, and compute over the last 7 days (2025-08-26 to 2025-09...

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

Build SQL pivot with lookups and currency conversion

You are given the following schema and sample data. Use SQL (or Python with SQL-like transforms) to answer the tasks below. Treat amounts as gross rev...

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

Add a conditional column in Python

Using pandas, add a derived column to a table based on multiple conditions with strict precedence and missing-value handling. Given the sample DataFra...

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

Compute CTR and metrics with pandas

Using pandas only, compute banner and story metrics. Assume today is 2025-09-01 and 'last 7 days' means 2025-08-26 to 2025-09-01 inclusive. You are gi...

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

Define and compute shop visibility in SQL

You own the 'shop visibility' KPI for a marketplace. Define a precise metric and write SQL to compute it over the last 7 days (use today = 2025-09-01,...

Data Manipulation (SQL/Python)
6
0
64 people solved
Oct 13, 2025
Coinbase logo
Coinbase
Medium
Data Scientist

Compute adoption, latency, and cross-region transactions

Invented schema: users(user_id INT PRIMARY KEY, user_region STRING, adopted_at TIMESTAMP NULL) transactions(txn_id INT PRIMARY KEY, user_id INT, txn_t...

Data Manipulation (SQL/Python)
3
0
44 people solved
Oct 13, 2025
Coinbase logo
Coinbase
Medium
Data Scientist

Write SQL: sum values ≤ each row’s value

Given table numbers(id INT PRIMARY KEY, val INT), return for every row the sum of all val across the entire table that are ≤ that row’s val (i.e., com...

Data Manipulation (SQL/Python)
6
0
55 people solved
Oct 13, 2025
Medium
Data Scientist

Manipulate data efficiently in Python

Answer the following: (a) Contrast list comprehensions and generators with respect to memory and evaluation; write a generator that yields rolling win...

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

Query conversion and retention with SQL windows

Schema and sample data (PostgreSQL): users(id, signup_date, country) 1 | 2025-08-20 | US 2 | 2025-08-25 | US 3 | 2025-08-27 | CA 4 | 2025-08-30 | US 5...

Data Manipulation (SQL/Python)
0
0
6 people solved
Oct 13, 2025

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

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

By company
Other categories for Data Scientist
Data Manipulation (SQL/Python) questions for other roles
Browse all