Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
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 feedbackSuccess 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
Average Coach Response Time
00:00
5 left

Average Coach Response Time

MediumSQL · PostgreSQL

Problem

Given a table of message exchanges between Omada Health coaches and members, find the average response time for coaches, grouping by the day of the week.

Treat a coach message as a response only when the immediately preceding message in the same conversation was sent by a member. Ignore messages with a NULL sent_at value.

Output

  1. One row per weekday with at least one qualifying coach response.
  2. Columns: day_of_week and average_response_minutes, rounded to two decimal places.
  3. Order weekdays Monday through Sunday. Rows with a NULL sent_at value are ignored.

Schema

coach_member_messages
ColumnTypeDescription
message_idPKINTEGERUnique identifier for the message
conversation_idVARCHAR(100)Identifier for the coach-member conversation
sender_typeVARCHAR(100)Role of the message sender
sent_atTIMESTAMPTimestamp when the message was sent
Tablescoach_member_messages
Interviewer

Your question is Average Coach Response Time. 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.