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

Write conditional aggregates with CASE WHEN

Write conditional aggregates with CASE WHEN Write a query that produces conditional aggregates using CASE WHEN (e.g., counts of approved vs declined t...

Data Manipulation (SQL/Python)
4
0
57 people solved
Jul 31, 2025
Amazon logo
Amazon
Medium
Data Scientist

Find recommended friend pairs by shared songs

You work on a music app and want to recommend “friend” connections based on listening similarity. Assume the following tables (all timestamps are in U...

Data Manipulation (SQL/Python)
5
0
46 people solved
Dec 20, 2025
Meta logo
Meta
Easy
Data Scientist

Compute reply-based user metrics in 7 days

You are analyzing discussions on a social platform. Tables all_post - post_id (BIGINT, PK) - post_author_id (BIGINT, FK → user.user_id) - post_creatio...

Data Manipulation (SQL/Python)
21
1
174 people solved
Dec 18, 2025
TikTok logo
TikTok
Medium
Data Scientist

Calculate User Registration Date and 7-Day Retention Rate

user_posts +---------+--------------+-----------+ | user_id | posting_date | num_posts | +---------+--------------+-----------+ | 1 | 2023-01-01...

Data Manipulation (SQL/Python)
81
0
7 people solved
Jul 12, 2025
Pinterest logo
Pinterest
Medium
Data Scientist

Analyze Global Engagement and Impressions with SQL Queries

impressions +---------+---------+----------+----------------+ | user_id | country | category | impression_cnt | +---------+---------+----------+------...

Data Manipulation (SQL/Python)
45
0
7 people solved
Jul 12, 2025
Netflix logo
Netflix
Medium
Data Scientist

Determine Maximum Consecutive Order Days Per User

Determine Maximum Consecutive Order Days Per User orders +----+---------+------------+ | id | user_id | order_date | +----+---------+------------+ | ...

Data Manipulation (SQL/Python)
61
0
139 people solved
Jul 12, 2025
OpenAI logo
OpenAI
Medium
Data Scientist

Design Schema and Logic for Subscription Event Tracking

user_subscription_events +----------+-------------+---------------------+-----------+---------+ | user_id | event_type | event_time | plan_...

Data Manipulation (SQL/Python)
71
0
159 people solved
Jul 12, 2025
Uber logo
Uber
Medium
Data Scientist

Calculate January-2024 SF Promotion Impact Using SQL Queries

campaign_users +---------+-----------+ | user_id | treatment | +---------+-----------+ | 1001 | control | | 1002 | test | | 1003 | con...

Data Manipulation (SQL/Python)
7
0
7 people solved
Jul 12, 2025
Meta logo
Meta
Easy
Data Scientist

Compute percent of active users with 50+ calls

Problem You work on a Messenger-like app. You want to measure how many active users in Great Britain (GB) today have been heavy callers recently. Tabl...

Data Manipulation (SQL/Python)
8
1
110 people solved
Dec 8, 2025
Databricks logo
Databricks
Easy
Data Scientist

Count weekly customers with ≥$1000 YTD spend

Question You are given a transaction-level table and must compute a weekly time series of how many customers have reached a year-to-date spending thre...

Data Manipulation (SQL/Python)
10
1
95 people solved
Dec 3, 2025
Intuit logo
Intuit
Easy
Data Scientist

Compute monthly signups, conversion, and YoY growth

You work at a subscription company and are given a user-level table. Table company_users - id (INT, PK) — user/customer id - signup_date (DATE) — date...

Data Manipulation (SQL/Python)
10
1
139 people solved
Nov 8, 2025
Chime logo
Chime
Easy
Data Scientist

Compute early signals for user retention

You are given two tables that track signups and user transactions. Tables users - user_id (STRING, PK) — unique user - signup_ts (TIMESTAMP) — time th...

Data Manipulation (SQL/Python)
13
1
120 people solved
Nov 6, 2025
LinkedIn logo
LinkedIn
Medium
Data Scientist

[SQL] Job Ad Metrics with Applicant Filter

Job Ad Metrics Analysis Task Table Structure Table: job_activity job_id INT candidate_id INT activity_type VARCHAR -- can be 'view' or 'apply' Requi...

Data Manipulation (SQL/Python)
11
0
45 people solved
Apr 23, 2025
Meta logo
Meta
Medium
Data Scientist

Write SQL to compare social-only vs game-only engagement

You are given two tables capturing Oculus app usage. Define an 'active day' as a UTC date on which a user generates at least one event. Consider only ...

Data Manipulation (SQL/Python)
40
1
336 people solved
Oct 13, 2025
Capital One logo
Capital One
Medium
Data Scientist

Reconcile ledgers with SQL/Python and late events

You own a daily ETL + reconciliation job between two financial ledgers. Late postings (“delay time”) up to 48 hours are common. Schema: - payments_raw...

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

Define and query shop visibility

You are given the following schema. Use only the columns provided; do not introduce new fields or labels. Tables and columns: - shops(shop_id INT, sho...

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

Design an idempotent SQL ETL for late data

You own the daily_user_metrics fact table. Build an idempotent, rerunnable ETL that can be triggered for any date D and correctly handles duplicates, ...

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

Compute join counts and window ranks

Given the following small schema and data, answer all parts precisely and justify each count/output. Tables and rows: Customers(cust_id INT PRIMARY KE...

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

Transform clickstream with pandas sessionization

Given a pandas DataFrame events with columns [user_id:int, ts:str ISO8601 or NaT, url:str, server_log_ts:datetime], build 30-minute inactivity session...

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

Write SQL for cohort retention and ARPU

Using PostgreSQL, compute monthly signup cohort D30 retention and 30-day ARPU. Cohort month = date_trunc('month', signup_date). D30 retention = users ...

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