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
Handling Missing Data in Dashboards
00:00
5 left

Handling Missing Data in Dashboards

MediumSQL · PostgreSQL

Problem

How would you handle missing or corrupted data fields when preparing an executive-level dashboard?

Write a SQL query that classifies each metric snapshot as usable, missing, or corrupted. Do not silently substitute values for missing or corrupted metrics. Preserve the record for auditability while returning a NULL dashboard value when the metric is not usable.

Output

  1. One row per metric snapshot.
  2. Columns: metric_date, metric_name, dashboard_value, data_status, and quality_issue.
  3. Include all snapshots, order by metric_date ascending and metric_name ascending.

Schema

dashboard_metric_snapshots
ColumnTypeDescription
snapshot_idPKINTUnique metric snapshot identifier
metric_dateDATEReporting date for the metric
metric_nameVARCHAR(100)Name of the dashboard metric
metric_valueNUMERIC(14,4)Reported numeric value, which may be missing
source_systemVARCHAR(100)System that supplied the metric
data_quality_flags
ColumnTypeDescription
quality_flag_idPKINTUnique quality flag identifier
snapshot_idINTMetric snapshot associated with the flag
field_nameVARCHAR(100)Field that was reviewed
issue_typeVARCHAR(50)Quality finding classification
issue_detailVARCHAR(255)Additional explanation of the finding
Tablesdashboard_metric_snapshotsdata_quality_flags
Interviewer

Your question is Handling Missing Data in 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.