Module 15 · Career, Interviews and the Final Exam · Lesson 50 of 51

Interview practice

The usual interview rounds and how to prepare: live SQL and pandas, statistics and probability, ML concepts, product and case questions, and behavioural answers with STAR. Practise with real questions.

In this lesson · about 50 minutes

  • Solve typical SQL and pandas interview questions under time pressure
  • Answer statistics, probability and ML concept questions clearly
  • Structure product cases and behavioural answers

The rounds

RoundTypical questionHow to shine
SQL"Top 3 products by revenue in each region last month"Clarify the definition of each word, write it step by step with CTEs, check edge cases (ties, nulls).
Python / pandas"Clean this file and find weekly retention"Look at the data first; explain each step; check shapes as you go.
Statistics"Explain a p-value to a manager." "When would you use a median?"Plain words first, then the precise definition.
ML"How would you predict churn? How do you know it works?"Target definition, features, leakage, baseline, metric that matches the cost, validation, monitoring.
Product case"Orders dropped 10% last week. What happened?"Clarify, check the data is right, split by segment (platform, region, new vs returning), form hypotheses, propose checks.
Behavioural"Tell me about a time you disagreed with a stakeholder."STAR: Situation, Task, Action, Result. Two minutes, with a number in the result.

Exercise

SQL: top 2 items per branch

The classic: write a query with ROW_NUMBER() OVER (PARTITION BY branch ORDER BY revenue DESC) that returns the top 2 items by revenue in each branch, with columns branch, item, revenue (rounded to 2), ordered by branch then rank. Store the result of q(sql) in top2.

Code that runs before yours
import sqlite3
import pandas as pd
con = sqlite3.connect(":memory:")
pd.read_csv("kc_orders.csv").to_sql("orders", con, index=False)
q = lambda sql: pd.read_sql_query(sql, con)

Exercise

Probability: the two-test puzzle

An interview favourite: 1% of card payments are fraud. A detector flags 95% of frauds and 2% of honest payments. A payment is flagged, then a second, independent detector with the same accuracy also flags it. Set p_one to P(fraud | one flag) and p_two to P(fraud | both flag), each rounded to 4 decimals, using Bayes' rule.

Exercise

pandas: repeat customers by month

"What share of each month's orders came from returning customers?" Set share to a dict of month number → share of rows with customer == "Returning", rounded to 3 decimals, and trend_up to True if June's share is higher than January's.

Code that runs before yours
import pandas as pd
orders = pd.read_csv("kc_orders.csv", parse_dates=["date"])

Decision scenario

Product case: orders dropped 10%

You're in a product data scientist interview at a food-delivery app.

"Orders dropped 10% last week compared with the week before. Walk me through how you'd investigate."

What do you recommend?

0 of 3 options explored. Try the others to see how each would play out.

Prepare a STAR answer for: 'Tell me about a project where the data changed a decision.'

Consider these questions and write down your thoughts. What you write stays on this device.

Exercises solved: 0 of 3

Tip: solve each exercise first. Press Check to test your code.

Written by Noviq Academy in its own words. Kettle & Crumb and all its data are made up for teaching; any resemblance to a real business is a coincidence. Python runs in your browser with Pyodide, so results can differ slightly from your own computer. Power BI, Tableau and other product names belong to their owners. Read-aloud uses your device's built-in voices.