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
OLTP vs OLAP for Progress Data
00:00
5 left

OLTP vs OLAP for Progress Data

MediumSQL · PostgreSQL

Problem

Compare and contrast different database strategies (OLTP vs. OLAP) for storing construction progress data at Doxel.

Using the provided operational event records and analytical daily summaries, write a query that compares the two representations for each project and date. Identify whether each record matches, differs, or exists in only one representation.

Output

  1. One row per project and progress date, including projects and dates present in either source.
  2. Return project_id, project_name, progress_date, oltp_planned_units, oltp_completed_units, olap_planned_units, olap_completed_units, and comparison_status.
  3. Sort by project_id, then progress_date ascending.

Schema

projects
ColumnTypeDescription
project_idPKINTUnique construction project identifier
project_nameVARCHAR(100)Project name
progress_events
ColumnTypeDescription
event_idPKINTUnique operational progress event identifier
project_idINTReferenced construction project
progress_dateDATEDate of the progress event
planned_unitsINTUnits planned in the event
completed_unitsINTUnits completed in the event
daily_progress_summary
ColumnTypeDescription
summary_idPKINTUnique analytical summary identifier
project_idINTReferenced construction project
progress_dateDATEDate represented by the summary
olap_planned_unitsINTPlanned units stored in the analytical summary
olap_completed_unitsINTCompleted units stored in the analytical summary
Tablesprojectsprogress_eventsdaily_progress_summary
Interviewer

Your question is OLTP vs OLAP for Progress Data. 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.