Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Summarize Campaign Results for Leadership

EasySQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is Summarize Campaign Results for Leadership. Start with the requirements and the one table on the right.

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.

Problem

You are asked to prepare a simple leadership summary of marketing campaign performance from a single table used for PNC campaign reporting. Write a SQL query that returns one row per campaign for delivered campaigns only, showing the campaign name, total emails sent, total clicks, and average conversion rate. Sort the results so the strongest-performing campaigns appear first by total clicks.

Schema

pnc_campaign_results
ColumnTypeDescription
campaign_idPKINTUnique row identifier
campaign_nameVARCHAR(100)Name of the marketing campaign
channelVARCHAR(50)Marketing channel used
send_dateDATEDate the campaign was sent
emails_sentINTNumber of emails sent
clicksINTNumber of clicks generated
conversion_rateDECIMAL(5,2)Conversion rate percentage for the send
delivery_statusVARCHAR(20)Status of the send record
Tablespnc_campaign_results
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results