Getting an [null] response from SQL query using json_agg – Postgresql
Still learning SQL/PostgreSQL. I am struggling to figure out how to stop returning an array with a null value as [null] and instead just return an empty array. COALESCE( json_agg( CASE WHEN socials.id IS NULL THEN NULL ELSE json_build_object('id', socials.id,…