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
Marketplace Operations SQL Analysis
00:00
5 left

Marketplace Operations SQL Analysis

HardSQL · PostgreSQL

Problem

Write a SQL query to analyze marketplace operations performance by joining expert activity, user demand, and resolution tables, then calculate daily response time and completion rate by region. Use all demand records, including records without an expert response or resolution. Treat the first response event as the response time and report completion rate as a decimal from 0 to 1.

Output

  1. One row per demand date and region, including regions with no response.
  2. Return region, demand_date, demand_count, responded_count, avg_response_hours, completed_count, completion_rate, and previous_day_completion_rate.
  3. Sort by region, then demand_date ascending.

Schema

user_demand
ColumnTypeDescription
demand_idPKINTUnique marketplace demand record
user_idINTUser who submitted the demand
expert_idINTAssigned expert identifier
regionVARCHAR(50)User demand region
requested_atTIMESTAMPTimestamp when the demand was submitted
expert_activity
ColumnTypeDescription
activity_idPKINTUnique expert activity record
demand_idINTRelated user demand
expert_idINTExpert performing the activity
activity_typeVARCHAR(30)Activity classification
activity_atTIMESTAMPTimestamp of the activity
resolution
ColumnTypeDescription
resolution_idPKINTUnique resolution record
demand_idINTRelated user demand
resolution_statusVARCHAR(30)Current resolution status
resolved_atTIMESTAMPTimestamp when the demand was resolved
Tablesuser_demandexpert_activityresolution
Interviewer

Your question is Marketplace Operations SQL Analysis. Start with the requirements and the three tables 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.