Search ⌘K
Google
Google

Foundations Track · Easy · 15 min

Advertiser Health Status

Classify each advertiser based on month-over-month spend. Return advertiser_id and status using these rules: New if previous_month_spend is 0 and current_mon...

Foundations Track
Easy
15 min
query basics
filtering

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

Objective

Practice query basics through a Google-tagged business scenario.

Approach

Use this track to lock in clean query structure, basic filtering logic, and confidence with grouped output.

Company context

Company labels are directional practice context, not official interview guidance.

Prereq: query basics

Classify each advertiser based on month-over-month spend. Return advertiser_id and status using these rules: New if previous_month_spend is 0 and current_month_spend is positive, Churn if previous_month_spend is positive and current_month_spend is 0, Upsell if current_month_spend is greater than previous_month_spend, Downsell if lower, otherwise Same. Order by advertiser_id.

ad_budgets
advertiser_id INT
previous_month_spend INT
current_month_spend INT
advertiser_idprevious_month_spendcurrent_month_spend
10200
21500
3100180
412090
58080
Editor
SQL workspace

Run queries against the protected question data, then submit once the result shape looks right.

Sign in to run SQL

Create a free account or sign in before running queries against protected question data.