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
Cleaning Messy Municipal Data
00:00
5 left

Cleaning Messy Municipal Data

HardSQL · PostgreSQL

Problem

How would you analyze raw, potentially messy municipal datasets from City of Austin Texas to extract meaningful metrics?

For a hands-on SQL response, use the provided request, neighborhood, and department tables. Account for duplicate records, inconsistent status text, invalid dates, and unmatched reference values.

Output

  1. One row per recognized neighborhood, department, and calendar month
  2. Include neighborhood_code, neighborhood_name, department_name, month_start, request_count, completed_requests, average_resolution_days, completion_rate, and completion_rate_change_points
  3. Include only valid, recognized requests, order by neighborhood code and month

Schema

raw_311_requests
ColumnTypeDescription
request_idINTBusiness identifier for a service request, duplicated across raw versions
neighborhood_codeVARCHAR(10)Raw neighborhood reference code
department_codeVARCHAR(10)Raw department reference code
status_textVARCHAR(40)Unstandardized request status
created_date_textVARCHAR(20)Creation date received as text
closed_date_textVARCHAR(20)Closing date received as text
updated_atTIMESTAMPTimestamp of the raw record version
neighborhoods
ColumnTypeDescription
neighborhood_codePKVARCHAR(10)Reference neighborhood code
neighborhood_nameVARCHAR(100)Official neighborhood name
departments
ColumnTypeDescription
department_codePKVARCHAR(10)Reference department code
department_nameVARCHAR(100)Official department name
Tablesraw_311_requestsneighborhoodsdepartments
Interviewer

Your question is Cleaning Messy Municipal Data. 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.