I did not quite understand what result you want to get, but if you want to get the value from the field from some row in the table and 0, if there are no rows, try:
select coalesce((select field from table limit 1), 0)
If you have a filter condition for a table that can return 1 row or nothing, try this query:
select coalesce((select field from table where <your condition>), 0)
source share