Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
Diagnose Campaign Performance Drops
00:00
5 left

Diagnose Campaign Performance Drops

MediumSQL · PostgreSQL

Problem

Explain how you would utilize Python, R, or advanced spreadsheet functions to diagnose an unexpected drop in marketing campaign performance.

For this SQL exercise, use the supplied weekly campaign and regional benchmark data to identify campaigns whose latest conversion rate declined materially from the previous week and declined more than their regional benchmark.

Output

  1. Return one row per qualifying campaign with campaign_name, channel, region, previous_conversion_rate, latest_conversion_rate, campaign_drop_pct, and benchmark_change_pct.
  2. Include only campaigns with at least a 20% conversion-rate decline and a worse decline than the regional benchmark.
  3. Sort by campaign_drop_pct descending, then campaign_name ascending.

Schema

campaigns
ColumnTypeDescription
campaign_idPKINTUnique campaign identifier
campaign_nameVARCHAR(100)Campaign name
channelVARCHAR(50)Marketing channel
statusVARCHAR(20)Campaign status
campaign_weekly_performance
ColumnTypeDescription
performance_idPKINTUnique weekly performance record
campaign_idINTCampaign associated with the weekly metrics
regionVARCHAR(30)Regional reporting segment
week_startDATEStart date of the reporting week
clicksINTWeekly clicks
conversionsINTWeekly conversions
regional_benchmarks
ColumnTypeDescription
benchmark_idPKINTUnique benchmark record
regionVARCHAR(30)Regional benchmark segment
week_startDATEStart date of the benchmark week
conversion_rateDECIMAL(8,4)Regional benchmark conversion rate
Tablescampaignscampaign_weekly_performanceregional_benchmarks
Interviewer

Your question is Diagnose Campaign Performance Drops. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.