Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Summarize Customer Activity for Reports

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

Your question is Summarize Customer Activity for Reports. Start with the requirements and the three tables 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

Write a PostgreSQL query that combines accounts, properties, and sync_runs to generate a January 2024 customer report. Return one row per account with property count, successful January sync count, total January records processed from successful syncs, and a derived health label.

Schema

Tables
  • accounts
  • properties
  • sync_runs
Tablesaccountspropertiessync_runs
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results