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

Select Top Customers Using Transaction Data Filters

transactions +----+---------+------------+--------+ | id | user_id | order_date | amount | +----+---------+------------+--------+ | 1 | 101 | 202...

Data Manipulation (SQL/Python)
249
1
747 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Retrieve First Active and Last Inactive Dates per User

Given a table activity that tracks user activities, write a SQL query to retrieve the first active date and last inactive date for each user. Table Sc...

Data Manipulation (SQL/Python)
187
9
357 people solved
Aug 4, 2025
Meta logo
Meta
Medium
Data Scientist

Improve YoY Revenue Analysis with Complementary Metrics

ads_revenue +------------+-----------+ | date | revenue | +------------+-----------+ | 2023-01-01 | 120000 | | 2023-02-01 | 125500 | | 2...

Data Manipulation (SQL/Python)
101
0
241 people solved
Aug 4, 2025
Meta logo
Meta
Medium
Data Scientist

Analyze Oculus App Engagement with SQL Queries

AppUsage +---------+--------+-----------+--------------+------------+ | user_id | app_id | category | minutes_spent| usage_date | +---------+--------...

Data Manipulation (SQL/Python)
62
0
162 people solved
Aug 4, 2025
Meta logo
Meta
Medium
Data Scientist

Identify Top Three Active Users by Event Date

event_log +------------+---------+-----------+---------------------+ | event_date | user_id | event_type| event_timestamp | +------------+--------...

Data Manipulation (SQL/Python)
137
1
356 people solved
Aug 4, 2025
PayPal logo
PayPal
Medium
Data Scientist

Identify Users with Specific Page Visit Sequence

page_visits +------------+---------+---------+----------+ | date | user_id | page_id | ts | +------------+---------+---------+----------+ ...

Data Manipulation (SQL/Python)
55
0
5 people solved
Jul 12, 2025
LinkedIn logo
LinkedIn
Medium
Data Scientist

Identify Top Contributors by Recent Post Count

posts +----+---------+---------------------+ | id | user_id | created_at | +----+---------+---------------------+ | 1 | 101 | 2023-09-01...

Data Manipulation (SQL/Python)
63
0
5 people solved
Jul 12, 2025
LinkedIn logo
LinkedIn
Medium
Data Scientist

Identify and Flag Bot Traffic in Online Forum

PVE +----------+-----------+ | memberId | timestamp | +----------+-----------+ | 101 | 169100123 | | 102 | 169100225 | | 101 | 16910030...

Data Manipulation (SQL/Python)
83
0
263 people solved
Jul 12, 2025
TikTok logo
TikTok
Medium
Data Scientist

Compute 7-Day Rolling Average of Unique Post Viewers

POST_VIEWS +---------+------------+---------+ | user_id | view_date | post_id | | 101 | 2023-08-01 | 10 | | 102 | 2023-08-01 | 11 |...

Data Manipulation (SQL/Python)
91
0
441 people solved
Jul 12, 2025
Amazon logo
Amazon
Medium
Data Scientist

Calculate Weekly, Monthly Watch Hours for Paid Users

video_view_logs +---------+----------+----------------+------------+------------+ | user_id | video_id | watched_seconds| watch_date | device_type| +-...

Data Manipulation (SQL/Python)
87
0
212 people solved
Jul 12, 2025
Amazon logo
Amazon
Medium
Data Scientist

Identify First Daily Order for Each Merchant

Orders +----------+-------------+---------+------------+ | order_id | merchant_id | amount | order_date | +----------+-------------+---------+-------...

Data Manipulation (SQL/Python)
76
0
274 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Calculate Weekly Thread Engagement with Reactions in SQL

messages +------------+--------+----------+--------------+---------------------+ | message_id | sender | receiver | has_reaction | timestamp ...

Data Manipulation (SQL/Python)
79
0
192 people solved
Jul 12, 2025
Airbnb logo
Airbnb
Medium
Data Scientist

Aggregate User Activity, Fit Regression, Interpret Coefficients

user_metrics +----------+------------+---------+--------+-----------+ | user_id | activity_dt| variant | clicks | purchases | +----------+-----------...

Data Manipulation (SQL/Python)
101
0
272 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Calculate Engagement Metrics for Info-Stream Content Analysis

info_stream_views +----------+-----------+--------------+----------+------------+ | post_id | viewer_id | relationship | duration | ds | +---...

Data Manipulation (SQL/Python)
107
1
243 people solved
Jul 12, 2025
Amazon logo
Amazon
Medium
Data Scientist

Explore Subscription Patterns and Status Transitions with SQL/Pandas

subscriptions +-----------------+---------+-------------+ | subscription_id | status | status_date | +-----------------+---------+-------------+ | 10...

Data Manipulation (SQL/Python)
67
0
8 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Design SQL Query for Shop Visibility and User Activity Metrics

SHOP_VISIBILITY +----------+---------+------------+------------+-------------+--------------+ | user_id | shop_id | event_date | is_visible | signup_...

Data Manipulation (SQL/Python)
78
0
181 people solved
Jul 12, 2025
Snapchat logo
Snapchat
Medium
Data Scientist

Monitor Friend-Request System for Quality and Abuse

Friendship +--------------+-------------+---------------------+---------------------+ | requester_id | approver_id | request_ts | approval_ts...

Data Manipulation (SQL/Python)
111
1
351 people solved
Jul 12, 2025
Google logo
Google
Medium
Data Scientist

Design Scalable Database and Analyze E-commerce Data

transactions +-----------+----------+------------+------------+ | user_id | order_id | product_id | order_time | +-----------+----------+-----------...

Data Manipulation (SQL/Python)
68
0
253 people solved
Jul 12, 2025
Meta logo
Meta
Medium
Data Scientist

Calculate Video Call Usage Metrics by Country and Date

video_calls +---------+-----------+------------+---------+----------+ | caller | recipient | ds | call_id | duration | +---------+-----------...

Data Manipulation (SQL/Python)
83
0
150 people solved
Jul 12, 2025
Snapchat logo
Snapchat
Medium
Data Scientist

Compute User Group Stories and Aggregate Story Engagement

user_story_engagement +---------+----------+------------+------------+-------+-------+ | user_id | story_id | story_type | created_at | views | likes ...

Data Manipulation (SQL/Python)
96
0
226 people solved
Jul 12, 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