TikTok Data Manipulation (SQL/Python) Interview Questions

TikTok Data Manipulation (SQL/Python) interview questions focus on real-world data problems at extreme scale: expect tasks that test your ability to transform messy event logs, compute cohort and funnel metrics, and optimize queries or scripts for performance. Interviews emphasize SQL fluency—joins, window functions, aggregates, CTEs, NULL handling and performance tradeoffs—alongside Python data-manipulation using pandas or lightweight algorithms. Interviewers evaluate correctness, edge-case handling, runtime and space complexity, clarity of thought, and the ability to explain tradeoffs and assumptions. Product context and experiment-signal thinking often appear alongside purely technical prompts. For interview preparation, plan for a short recruiter screen followed by several technical rounds that include timed SQL problems (often on a coding platform), Python scripting challenges, and for some roles, questions about big-data tooling or data pipelines. Practice writing runnable SQL from sample schemas, reproducing logic in pandas, and explaining your approach out loud. Time yourself on medium-to-hard problems, revisit fundamentals like window functions and grouping vs HAVING, and prepare concise examples from your experience that show impact and ownership. Mock interviews and clean, commented code will raise your confidence on test day.

33 Questions 1 Company02.04.2026
Showing 13 results
Role
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
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
TikTok logo
TikTok
Medium
Data Engineer

Debug a Hive Query for DAU

You are given two Hive tables: users(user_id BIGINT, created_at TIMESTAMP) and events(user_id BIGINT, event_time TIMESTAMP, event_name STRING) PARTITI...

Data Manipulation (SQL/Python)
0
0
7 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Data Scientist

Identify Repeat Advertisers from Consecutive Weeks

SUBMISSIONS +--------------+-----------+-----------+ | advertiser_id| ad_id | week_id | +--------------+-----------+-----------+ | A123 ...

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

Calculate Monthly Conversion Rate and Average Order Value

page_views +-----------+---------+---------------------+ | user_id | page_id | view_timestamp | +-----------+---------+---------------------+ |...

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

Analyze Posting Behavior by Cohort and Date

creator_post +------------+---------+------+ | post_date | user_id | post | +------------+---------+------+ | 2023-01-01 | 111 | 1 | | 2023-01...

Data Manipulation (SQL/Python)
0
0
4 people solved
Aug 4, 2025
TikTok logo
TikTok
Medium
Software Engineer

Write complex SQL for cohorts and retention

Given tables users(uid, created_at, country), orders(order_id, uid, amount, created_at, status), and events(uid, ts, event_type, campaign), write one ...

Data Manipulation (SQL/Python)
0
0
9 people solved
Jul 15, 2025
TikTok logo
TikTok
Medium
Data Engineer

Debug a Hive insert query

Given a Hive table schema and an incoming table plus an INSERT/SELECT statement meant to inject data, identify why the query fails and provide step-by...

Data Manipulation (SQL/Python)
0
0
5 people solved
Jul 15, 2025
TikTok logo
TikTok
Medium
Data Engineer

Explain a SQL query result

Given two tables and a specific SQL query, precisely explain the expected result set: which rows are returned, what each column contains, how joins/fi...

Data Manipulation (SQL/Python)
1
0
10 people solved
Jul 15, 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
440 people solved
Jul 12, 2025
TikTok logo
TikTok
Medium
Data Scientist

Identify Top Discounts and Monitor Code Submissions

Products +------------+----------+-------+----------+ | product_id | category | price | discount | +------------+----------+-------+----------+ | 101 ...

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

Analyze and Clean European Ecommerce Sales Data

sales +----------+-------------+------------+---------+---------+----------------+ | order_id | customer_id | order_date | country | revenue | product...

Data Manipulation (SQL/Python)
51
0
94 people solved
Jul 12, 2025

Frequently Asked Questions

How difficult are TikTok Data Manipulation (SQL/Python) interview questions?
TikTok data manipulation questions are typically medium to hard in difficulty, reflecting real-world problems with large, messy logs and performance constraints. Expect SQL problems that require window functions, joins, CTEs, and careful handling of NULLs, plus Python tasks that test pandas skills and algorithmic thinking. Time pressure is common in online assessments and live coding rounds, so efficiency and clarity matter as much as correctness. Difficulty can vary by team and role: growth or analytics roles may focus more on SQL, while platform or infrastructure roles may push harder on Python and algorithmic optimization.
What is the typical interview process and where does data manipulation appear?
Data manipulation shows up in multiple stages of the TikTok interview loop. Many candidates encounter a timed online assessment with SQL exercises and short Python tasks, followed by live technical interviews that include whiteboard or shared-editor SQL problems, pandas scripting, and take-home or system-design exercises that involve ETL logic. Data manipulation questions also arise in case or product rounds where you need to reconstruct metrics or diagnose issues from sample logs. The exact placement depends on the role, but strong SQL and Python chops are evaluated repeatedly throughout the process.
How should I structure my interview preparation timeline for this topic?
A focused four-week timeline is effective: start by solidifying SQL fundamentals and writing clean, correct queries, then progress to advanced window functions, CTEs, and performance tuning. Parallel to SQL, build or refresh practical Python skills for data manipulation with pandas, emphasizing vectorized operations and memory awareness. In the final week, simulate timed assessments, run mock interviews, and practice explaining tradeoffs and edge cases aloud. Regularly review past mistakes, time yourself on typical problems, and rehearse succinct explanations of your approach to mirror the live interview setting.
What key subtopics should I master within Data Manipulation (SQL/Python)?
Master joins and set operations, grouping and aggregates, window functions, and CTEs, as well as the difference between filtering and HAVING and correct NULL handling. Performance basics such as indexing logic, avoiding unnecessary subqueries, and minimizing data shuffles are important for production-style questions. For Python, focus on pandas groupby and merge patterns, date and string manipulation, memory-efficient transformations, vectorization over loops, and robust handling of missing or duplicate data. Being able to translate a SQL solution into idiomatic pandas code is often evaluated directly.
What standout tips and common pitfalls should I keep in mind?
Start by clarifying assumptions and articulating edge cases before coding, and use small example inputs to validate logic quickly. Avoid premature optimization, but be mindful of performance and scalability for large datasets, for instance by preferring window functions or vectorized pandas operations to rowwise loops. Don’t ignore NULLs, duplicates, or timezone and date boundary issues when working with timestamps. When stuck, communicate your thought process and tradeoffs clearly. Common pitfalls include misinterpreting requirements, returning incorrect aggregates due to grouping mistakes, and writing non-scalable Python loops instead of vectorized solutions.

Explore more TikTok Data Manipulation (SQL/Python) interview questions

Real questions from candidate reports, grouped by role, topic and company.

By role
Other categories at TikTok
Data Manipulation (SQL/Python) questions at other companies
Browse all