From de2aac8d2397e73ab300525cb59b495e845e2a85 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Sat, 3 Mar 2018 11:52:34 -0500 Subject: [PATCH] list out columns --- reports/dcard_bal.sql | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/reports/dcard_bal.sql b/reports/dcard_bal.sql index 5ea74c8..0d85d6f 100644 --- a/reports/dcard_bal.sql +++ b/reports/dcard_bal.sql @@ -1,8 +1,12 @@ \timing SELECT - r.*, - rec->'id', - SUM(r."Amount") OVER (PARTITION BY srce ORDER BY r."Post Date" asc , rec->>'id' asc, r."Description") + 1061.1 + 22.40 + r."Trans. Date", + r."Post Date", + r."Description", + r."Amount", + r."Category", + rec->'id' id, + SUM(r."Amount") OVER (PARTITION BY srce ORDER BY r."Post Date" asc , rec->>'id' asc, r."Description") + 1061.1 + 22.40 balance FROM tps.trans LEFT JOIN LATERAL jsonb_populate_record(null::tps.dcard, rec) r ON TRUE