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
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
Sign up free to run your codeLog inLn 1
Run your query to see results here.