ORDER BY phrases cannot be used in subqueries (although ORDER BY phrases can still be used in outer queries that contain subqueries). Subqueries in SELECT or WHERE clauses that return more than one ...
This is invalid because the subquery inside coalesce needs to be wrapped in parentheses. I can easily fix the code by moving coalesce inside the subquery, but wanted to report it because Ecto ...