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
Snowflake logo
Snowflake
Medium
Data ScientistSenior+

Build a cohort dashboard with Streamlit and SQL

You are given three tables and asked to build a minimal Streamlit app that helps a PM explore weekly cohort retention and ARPU by country. Assume SQL ...

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

Compute last-to-previous ad impression gaps

Given impressions(ad_id INT, user_id INT, impression_ts TIMESTAMP) with multiple impressions per (user_id, ad_id), write a single SQL query to return,...

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

Compute daily work hours from in/out events

Given punch events, compute each employee’s daily hours, handling unmatched events and overnight shifts. Write SQL over: events(employee_id INT, evt_t...

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

Calculate cross-channel login user proportions

Write SQL to compute, for 2025-08-29 through 2025-08-31, the proportion of users who logged in only via mobile, only via desktop, and via both, where ...

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

Compute CTR drop with exclusions

Assume today = 2025-09-01. Using ad delivery logs, find advertisers whose CTR in the last 7 days (2025-08-25 to 2025-08-31) dropped by at least 20% re...

Data Manipulation (SQL/Python)
8
0
110 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Compare SQL counts, windows, and NULL semantics

You’re given two tables. users(id INT, country STRING, created_at DATE) rows: 1 | US | 2025-08-28 2 | US | 2025-08-30 3 | IN | 2025-08-29 4 | BR | 202...

Data Manipulation (SQL/Python)
8
0
71 people solved
Oct 13, 2025
Stripe logo
Stripe
Medium
Data Scientist

Write SQL for snapshot features and labels

Use 'today' = 2025-09-01. Invented schema (UTC): users(u_id INT, signup_dt DATE, country STRING) events(u_id INT, event_time TIMESTAMP, arrival_time T...

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

Compute 7-day rolling complaint/order ratio in SQL

SQL only. Given the schema and sample data below, write a single Postgres query (no procedural code) to compute a 7-day rolling complaint-to-order rat...

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

Write SQL for comment analytics

You are given the following schema and tiny sample data. Schema: - users(user_id INT PRIMARY KEY, country VARCHAR, created_at DATE) - posts(post_id IN...

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

Manipulate data in R with dplyr joins and windows

Using R and dplyr, answer the following using these small tables (dates are ISO strings): transactions(user_id, order_id, order_date, channel, amount)...

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

Write complex SQL for streaming funnels

You are analyzing a Disney/Hulu product funnel with events captured in a single table. Write ANSI-SQL (Snowflake/BigQuery compatible) to answer the su...

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

Transform nested dicts with pandas apply/lambda

Given a pandas DataFrame df with columns: user_id (int), ts (datetime64[ns]), events (list of dicts), attrs (dict). Example rows (conceptual): user_id...

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

Write windowed retention and ARPU SQL

You are given three tables. Write one SQL script (CTEs allowed) that answers all parts using window functions and joins (no procedural loops): Schema:...

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

Compute leakage-safe rolling features in pandas

Using pandas on a 50M-row monthly panel with columns [loan_id, msa, month, property_type, delinquent_90dpd (0/1), upb], create features for each loan-...

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

Write advanced SQL for sales support analytics

Write SQL for the following schema and tasks. Assume ANSI SQL with DATE_TRUNC and INTERVAL supported. Sample tables (minimal rows shown). accounts +--...

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

Audit and onboard unfamiliar datasets safely

You inherit unfamiliar hotel search data with sparse documentation. Provide a concrete, ordered checklist to: a) discover tables/columns and verify pr...

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

Write SQL/Python for CTR analytics

Part A — SQL (use the schema and sample data below): Compute 48-hour unique CTR for campaign_id=100 by variant, deduplicating to the earliest send per...

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

Write monthly new-vs-returning requests SQL

Given the schema and sample data below, write a single PostgreSQL query (no dynamic SQL) that returns, for every calendar month present in requests, t...

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

Write complex joins and window functions

You are given a simplified Thumbtack-like marketplace schema in PostgreSQL. Assume UTC timestamps and weeks start on Monday. Treat "today" as 2025-09-...

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

Compute shop visibility and intent metrics in SQL

Schema (PostgreSQL). Tables: users(user_id) shops(shop_id, shop_name, merchant_type) posts(post_id, shop_id, is_shoppable BOOLEAN, created_at TIMESTAM...

Data Manipulation (SQL/Python)
0
0
7 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