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 Joins and DNS Working
00:00
5 left

SQL Joins and DNS Working

MediumSQL · PostgreSQL

Problem

Tell me about a time you debugged DNS-related issues and fixed SQL join queries to get correct results.

For the supplied records, write a PostgreSQL query that returns resolved DNS debugging records with at least one verified SQL join fix. Match fixes to their corresponding debugging record and exclude unverified fixes.

Output

  1. One row per qualifying debugging record, with incident_id, hostname, resolved_at, verified_join_fixes, and latest_fix_at
  2. Include only resolved records having at least one verified fix
  3. Order by latest_fix_at descending, then incident_id ascending

Schema

dns_incidents
ColumnTypeDescription
incident_idPKINTUnique debugging incident identifier
hostnameVARCHAR(255)Hostname involved in the DNS issue
resolution_statusVARCHAR(30)Current resolution state
resolved_atTIMESTAMPTime the incident was resolved
sql_join_fixes
ColumnTypeDescription
fix_idPKINTUnique SQL fix identifier
incident_idINTIncident associated with the fix
join_typeVARCHAR(30)Join type involved in the corrected query
validation_statusVARCHAR(30)Validation state of the SQL fix
fixed_atTIMESTAMPTime the fix was recorded
Tablesdns_incidentssql_join_fixes
Interviewer

Your question is SQL Joins and DNS Working. 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.