skip to Main Content

Postgresql group by and jsons just in one array

SQL Query like this below select json_build_array( json_build_object( 'entegrator_name', e2."name", 'provider_name', p."name", 'table1_count', count(t1.id) ) ) FROM table1 AS t1 JOIN entegrators AS e2 ON e.entegrator_id = e2.id JOIN providers AS p ON e.provider_id = p.id GROUP BY e2."name", p."name"…

VIEW QUESTION
Back To Top
Search