Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
SQL for Business Insights
00:00
5 left

SQL for Business Insights

EasySQL · PostgreSQL

Problem

How have you utilized SQL in your previous roles to support business decisions?

Demonstrate your approach by analyzing the provided Datadog usage records for the first quarter of 2025. Return one summary row per named service and exclude records outside the quarter or without a service name.

Output

  1. Columns: service_name and total_host_hours
  2. One row per service with its total host hours during the quarter
  3. Sort by total_host_hours descending, then service_name ascending for ties

Schema

datadog_usage
ColumnTypeDescription
usage_idPKINTUnique usage record identifier
service_nameVARCHAR(100)Datadog service or product area
usage_dateDATEDate associated with the usage record
host_hoursDECIMAL(10,2)Recorded monitored host hours
Tablesdatadog_usage
Interviewer

Your question is SQL for Business Insights. Start with the requirements and the one table 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
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.