Changed CASE to COALESCE