Chapter 9 · Interview Level
11. Patient Count by Email Domain
Easy10 XPHealthcare
IT wants to know which email domains are most common among patients. Extract the domain from the email (everything after '@') and count patients per domain. Return email_domain and patient_count. Order by patient_count descending.
Tables
- PKidINT
- first_nameTEXT
- last_nameTEXT
- date_of_birthTEXT
- genderTEXT
- emailTEXT
- phoneTEXT
- blood_typeTEXT
- cityTEXT
- stateTEXT
- FKinsurance_id→ insurance.idINT
- created_atTIMESTAMP
Need help?
Ask Sol
AI tutor — looks at your current query and nudges you, without spoiling the answer.
Solution
Try the hints first — solving it yourself is what makes it stick.