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
Point72 logo
Point72
Medium
Data Scientist

Write SQL for top student per department

Schema: Departments(dept_id PK, dept_name) Students(student_id PK, student_name, dept_id FK nullable, gpa numeric(3,2) nullable, enrolled_at date) Sam...

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

Implement left join on Python lists, no packages

Implement a left join in pure Python (no external packages, no pandas). Input: left = list of dicts with key 'id' and arbitrary other fields; right = ...

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

Compute CTR overall and by campaign type

Write SQL to compute: (Q1) overall click-through rate (CTR = clicks/impressions) in the last week; (Q2) CTR by campaign_type in the last week. Assume ...

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

Find most co‑purchased product pairs in SQL

Given the schema and sample data below, write ANSI-SQL to return the top 5 unordered product pairs most frequently purchased together across distinct ...

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

Design a scalable video platform database

Design the relational database for a YouTube-like video company. Deliverables: 1) list the core tables with key columns, types, and constraints (users...

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

Write SQL for percent and window changes

Use PostgreSQL. Assume today = 2025-09-01. You must use CTEs and multiple window functions. Schema and tiny samples are below. Schema: - exposures(uni...

Data Manipulation (SQL/Python)
50
0
355 people solved
Oct 13, 2025
Capital One logo
Capital One
Medium
Data Scientist

Merge four CSVs locally, robustly and efficiently

You receive four CSV files that must be merged locally on a laptop with 8 GB RAM, without relying on cloud services: - products.csv: product_id, categ...

Data Manipulation (SQL/Python)
9
0
81 people solved
Oct 13, 2025
Capital One logo
Capital One
Medium
Data Scientist

Write SQL for lowest price with ratings

You have two tables. Schema: - products(product_id INT PRIMARY KEY, product_name TEXT, category TEXT) - purchase(purchase_id INT PRIMARY KEY, product_...

Data Manipulation (SQL/Python)
4
0
80 people solved
Oct 13, 2025
Boston Consulting Group logo
Boston Consulting Group
Medium
Data Scientist

Transform messy transactions with pandas

You are given two CSVs. transactions.csv - Columns: txn_id, user_id, ts_iso (ISO8601 with timezone), amount (decimal USD; refunds negative), merchant_...

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

Analyze shopping funnel with joins and windows

Write SQL (PostgreSQL) to analyze a 4-step shopping funnel: view_product → add_to_cart → checkout_start → purchase. Use the schema and sample data bel...

Data Manipulation (SQL/Python)
14
0
115 people solved
Oct 13, 2025
Airbnb logo
Airbnb
Medium
Data Scientist

Compute C/T metrics from bookings and visits

Given two tables, compute control vs treatment (C/T) metrics, apply 24‑hour attribution, and generate a daily plot. Treat “today” as 2025‑09‑01; use t...

Data Manipulation (SQL/Python)
19
0
176 people solved
Oct 13, 2025
Boston Consulting Group logo
Boston Consulting Group
Medium
Data Scientist

Unify 7 tables and impute missing values

Using pandas, write a robust function unify_orders(...) that ingests seven dataframes (or CSVs) with possibly inconsistent column casing/whitespace an...

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

Calculate annual percentages and YoY by cohorts

Answer both SQL and Python parts. Be precise about deduping and denominator choices. SQL schema (sample rows): orders order_id | user_id | order_date ...

Data Manipulation (SQL/Python)
10
0
75 people solved
Oct 13, 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
Pinterest logo
Pinterest
Medium
Data Scientist

Find top video category by average time

You are given a pandas DataFrame 'pins' with columns [pin_id:int, category_id:int, time_spent_sec:float, pin_format:string] and a dict 'category_map' ...

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

Compute multi-account actives and unread coverage

You have two tables. Table: notifications +--------+------------+------------+-------------------+--------+ | userid | ds | time | notification_type |...

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

Compute violation rate and flag precision in SQL

You are analyzing a Trust & Safety product in BigQuery. Assume 'today' is 2025-09-01 (UTC). Define precise metrics and write SQL to compute them, bein...

Data Manipulation (SQL/Python)
11
0
100 people solved
Oct 13, 2025
TikTok logo
TikTok
Easy
Data Scientist

Write SQL for TikTok Live creator metrics

You are analyzing TikTok Live sessions and their engagement. Tables live_room Each row is a Live session (“room”) launched by a creator. | column | ty...

Data Manipulation (SQL/Python)
17
0
137 people solved
Oct 9, 2025
TikTok logo
TikTok
Easy
Data Scientist

Find high-value crypto users and top-CTR product

You are given three tables (timezone: UTC). Assume create_date, transaction_time, and event_time are timestamps. Tables users - user_id BIGINT PRIMARY...

Data Manipulation (SQL/Python)
4
1
75 people solved
Feb 4, 2026
LinkedIn logo
LinkedIn
Easy
Data Scientist

Compute each member’s current notification status

Question You are given two tables describing LinkedIn members’ push-notification settings. Compute each member’s current notification status as of 202...

Data Manipulation (SQL/Python)
9
0
102 people solved
Feb 1, 2026

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