Answers for "How to Group by and concatenate arrays with all columns in PostgreSQL"

SQL
0

How to Group by and concatenate arrays with all columns in PostgreSQL

SELECT DATE_TRUNC('day', date_time), JSON_AGG(t) AS row, SUM(amount) AS total
FROM table_a t GROUP BY DATE_TRUNC('day', date_time);
Posted by: Guest on November-15-2021

Code answers related to "How to Group by and concatenate arrays with all columns in PostgreSQL"

Code answers related to "SQL"

Browse Popular Code Answers by Language