Skip to main content
All Problems
easy0% acceptance

Customer Contact with COALESCE Fallback

Build a customer contact list where every row has a usable contact value. Return the customer's first_name, last_name, and a column called contact_info that shows the phone number if available, otherwise shows the email address.

Schema

🔑idINT
first_nameTEXT
last_nameTEXT
emailTEXT
phoneTEXTNULL
cityTEXT
stateTEXT
countryTEXT
created_atTIMESTAMP
postgresql

Run your query to see results

Press Ctrl + Enter to execute