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
Executive Dashboards in BI Tools
00:00
5 left

Executive Dashboards in BI Tools

MediumSQL · PostgreSQL

Problem

What is your experience with data visualization tools like Tableau or Power BI when designing executive dashboards?

For this SQL exercise, produce the dataset that could feed an executive dashboard. Include every active business unit and target month, even when no revenue exists.

Output

  1. One row per active business unit and target month.
  2. Return unit_id, unit_name, month_start, actual_revenue, target_revenue, variance, and attainment_status.
  3. Sort by month_start ascending, then unit_id ascending.

Schema

business_units
ColumnTypeDescription
unit_idPKINTBusiness unit identifier
unit_nameVARCHAR(100)Business unit name
regionVARCHAR(50)Reporting region
is_activeBOOLEANWhether the unit is active
dashboard_sales
ColumnTypeDescription
sale_idPKINTSale identifier
unit_idINTBusiness unit associated with the sale
sale_dateDATEDate of sale
revenueNUMERIC(12,2)Sale revenue
monthly_targets
ColumnTypeDescription
target_idPKINTTarget record identifier
unit_idINTBusiness unit assigned the target
month_startDATEFirst day of the target month
target_revenueNUMERIC(12,2)Revenue target for the month
Tablesbusiness_unitsdashboard_salesmonthly_targets
Interviewer

Your question is Executive Dashboards in BI Tools. 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.