Unique Hostnames per Region
A medium SQL mock interview question on DataDriven, with an AI interviewer who asks follow-up questions and a hire or no-hire decision at the end.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L5
Interview Prompt
Our capacity report counts 'WEB-03' and 'web-01' as two different kinds of machine, so we want to see where `infra_nodes` records the same role under more than one spelling. For each region and role, report how many hostnames it has and a label showing how the role is spelled there, with both spellings when the nodes disagree.
Summary
How many distinct machines live in each region?
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write and run your SQL against a real database
- Answer the interviewer's follow-up questions, then get a hire or no-hire decision