Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
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 feedbackSuccess 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
Designing Executive Dashboards
00:00
5 left

Designing Executive Dashboards

MediumSQL · PostgreSQL

Problem

How would you approach designing a dashboard or report for executive stakeholders at Gartner to drive strategic decisions?

Using the supplied Gartner account and engagement tables, write a SQL query that produces a quarterly executive KPI report by client segment. Include only completed engagements from 2025 and calculate the requested metrics from the available data.

Output

  1. One row per client segment and quarter with completed engagements.
  2. Columns: segment, quarter_start, active_clients, completed_engagements, total_revenue, avg_satisfaction, revenue_growth_pct.
  3. Sort by segment ascending, then quarter_start ascending. The first quarter for each segment should have a NULL growth percentage.

Schema

client_accounts
ColumnTypeDescription
account_idPKINTUnique Gartner client account identifier
account_nameVARCHAR(120)Client account name
segmentVARCHAR(60)Client market segment
advisory_engagements
ColumnTypeDescription
engagement_idPKINTUnique engagement identifier
account_idINTClient account associated with the engagement
engagement_dateDATEEngagement completion or scheduled date
statusVARCHAR(30)Engagement lifecycle status
revenueDECIMAL(12,2)Revenue attributed to the engagement
satisfaction_scoreDECIMAL(3,2)Client satisfaction score from 1.00 to 5.00
Tablesclient_accountsadvisory_engagements
Interviewer

Your question is Designing Executive Dashboards. Start with the requirements and the two 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.