Skip
Arish's avatar

147. Practice - COALESCE


Exercise: First Available Contact

Get first available: phone, email, or 'N/A'.

Solution

sql
1SELECT name,
2  COALESCE(phone, email, 'N/A') AS contact
3FROM students;