Skip to main content
All Problems
easy0% acceptance

Patient Contact Info with COALESCE

Create a contact list where missing phone numbers display 'No phone on file'. Return first_name, last_name, email, and COALESCE(phone, 'No phone on file') as contact_phone. Order by last_name.

Schema

🔑idINT
first_nameTEXT
last_nameTEXT
date_of_birthTEXT
genderTEXT
emailTEXT
phoneTEXTNULL
blood_typeTEXT
cityTEXT
stateTEXT
🔗insurance_idINTNULL
created_atTIMESTAMP
postgresql

Run your query to see results

Press Ctrl + Enter to execute