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

Compute and rank top bad advertisers

SQL on ad safety. Assume the following schema and sample rows. Use ANSI SQL. Today is 2025-09-01; interpret “last 7 days” as 2025-08-26 00:00:00 to 20...

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

Implement R dplyr simulation and left join

Using R and dplyr, run a simulation and a join. Data: prices item_id | price_usd 1 | 10.00 2 | 20.00 3 | 30.00 4 | 40.00 catalog item_id | category 1 ...

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

Calculate posts per DAU by country today

Given two tables: - user_activity(user_id INT, activity_date DATE, country STRING, dau_flag TINYINT CHECK(dau_flag IN (0,1))) - composer(user_id INT, ...

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

Compute daily post success rate for last 7 days

You have a table composer(user_id INT, event STRING CHECK(event IN ('enter','post','cancel')), event_date DATE). Compute the post success rate for eac...

Data Manipulation (SQL/Python)
7
1
45 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Write SQL for geo posting-frequency drops

Using the schema below, write a single ANSI SQL query (window functions allowed) that identifies countries with the largest share of creators whose po...

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

Write SQL to compute shop visibility share

Assume today is 2025-09-01. Compute the top 3 shops by average daily visibility share over the last 7 days (2025-08-26 to 2025-09-01, inclusive) for U...

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

Write SQL window functions for streaks

Assume today is 2025-09-01. Using standard SQL (e.g., PostgreSQL), answer the following using window functions only (no procedural loops, no correlate...

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

Write SQL with HAVING and efficient joins

You are given two tables. Schema - interactions(product_id INT, buyer_id INT, seller_id INT, interaction_date DATE, interaction_type VARCHAR, interact...

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

Write SQL to detect recurring non-subscription users

You have two tables: merchant and transaction. Assume 'today' is 2025-09-01. Schema: merchant(merchant_id INT PK, merchant_name TEXT, country TEXT, cr...

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

Merge seven tables into one clean DataFrame

Using pandas only (no loops over rows), write a function build_facts(customers, orders, order_items, products, payments, shipments, refunds) -> pd.Dat...

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

Manipulate and merge DataFrames correctly

Given three pandas DataFrames: customers customer_id, join_date, tier 101, 2025-01-02, gold 102, 2025-02-10, silver 103, 2025-03-05, gold products mod...

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

Produce dating profile funnel report by cohort

You work on a dating app. Produce a daily profile-funnel report for 2025-08-25 through 2025-09-01 inclusive, with one row per day, gender, and age_buc...

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

Compute French DAU video-call percentage yesterday

Compute the percentage of daily active users (DAU) from France who were on at least one video call yesterday (2025-08-31 UTC). DAU is defined as users...

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

Compute callers contacting >3 people last 7 days

Using the schema below, write a single SQL query to return the number of unique callers who started calls with more than 3 distinct other users during...

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

Write SQL for 7-day WhatsApp call metrics

Today is fixed as 2025-09-01. Using PostgreSQL, write a single query that returns one row per UTC calendar date for the last 7 days inclusive of today...

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

Write SQL for revenue and advertiser analyses

Use the schema below and ANSI SQL. Treat “today” as 2025-09-01. Schema: - active_ads(date DATE, ad_id INT, advertiser_id INT, creation_source VARCHAR,...

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

Use pandas to aggregate, pivot, and label

Given two pandas DataFrames, write code to: (1) merge and aggregate revenue; (2) produce a 2x2 pivot; (3) compute per-state counts with value_counts, ...

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

Write SQL for dedup and purchase shares

You are given two tables with intentional duplicates. Write SQL to: (a) identify duplicate user_ids and produce a canonical, deduplicated users set; (...

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

Write SQL to analyze Group Calls adoption

Write SQL (assume PostgreSQL) to analyze Group Calls adoption and cannibalization. Use this schema and sample data. Schema: - users(user_id INT PRIMAR...

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

Write SQL for initiators and French DAU%

You are given the following PostgreSQL tables. Assume all timestamps are UTC and "today" is 2025-09-01. For any reference to "last 7 days," use the in...

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