Don't aggregate the whole row, just aggregate the column: SELECT json_agg(invoice_number) FROM ( SELECT DISTINCT invoice_number FROM ...
確定! 回上一頁