What does COALESCE return when a customer's city is missing?
In the iv_customers table, Carol has no city listed, while Dan's city is Berlin. The query calculates COALESCE(city, 'unknown') for customers 3 and 4. Which rows will appear in the result? Choose the table with the correct values in id order.
Predict the resultNULLJuniorAnalystBackendQA
Input data · iv_customers
| id | name | city |
|---|---|---|
| 1 | Alice | Berlin |
| 2 | Bob | Paris |
| 3 | Carol | NULL |
| 4 | Dan | Berlin |
| 5 | Eve | Paris |
Query
SELECT id,
name,
COALESCE(city, 'unknown') AS city_label
FROM iv_customers
WHERE id IN (3, 4)
ORDER BY id