Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Diagnose Revenue Decline Drivers

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

Your question is Diagnose Revenue Decline Drivers. Start with the requirements and the five 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 explains a month-over-month revenue decline by breaking the change across multiple dimensions in Zulily reporting data. The result should compare each dimension value to its prior month, keep only negative movers, and show which values contributed most to the overall decline.

Schema

Tables
  • monthly_revenue
  • channels
  • devices
  • categories
  • customer_segments
Tablesmonthly_revenuechannelsdevicescategoriescustomer_segments
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results