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
Analyzing Data from Scratch
00:00
5 left

Analyzing Data from Scratch

MediumSQL · PostgreSQL

Problem

How do you analyze this data?

Use the tables below to assess lead quality across Insurify sources. Focus on leads created in the last 30 days and compare outcomes by source and response status.

Output

  1. One row per lead source
  2. Columns: source_name, lead_count, contacted_lead_count, contact_rate, avg_response_minutes
  3. Include only sources with at least 5 leads in the period
  4. Sort by contact_rate descending, then lead_count descending, then source_name ascending

Schema

lead_sources
ColumnTypeDescription
source_idPKINTUnique identifier for the lead source
source_nameVARCHAR(100)Readable lead source name
channelVARCHAR(50)Channel category for the source
leads
ColumnTypeDescription
lead_idPKINTUnique identifier for the lead
source_idINTSource that generated the lead
statusVARCHAR(20)Lead status such as new, contacted, or lost
created_atTIMESTAMPTimestamp when the lead was created
contacted_atTIMESTAMPTimestamp when the lead was first contacted
regionVARCHAR(50)Lead region
Tableslead_sourcesleads
Interviewer

Your question is Analyzing Data from Scratch. Start with the requirements and the two 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.