From 9aa4944709513c09ceef120b2ff85c649d0fcb4a Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 24 Aug 2017 23:46:15 -0400 Subject: [PATCH] link in header --- event_log.pgsql | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/event_log.pgsql b/event_log.pgsql index 16d6ef6..d8a5f31 100644 --- a/event_log.pgsql +++ b/event_log.pgsql @@ -21,9 +21,13 @@ FROM x JOIN LATERAL jsonb_to_recordset(x.j->'item') rs(item text, amount numeric) ON TRUE ) -select - * -from +SELECT + item.*, + acct.*, + r.* +FROM item INNER JOIN acct ON - acct.rn = item.rn \ No newline at end of file + acct.rn = item.rn + CROSS JOIN x + JOIN LATERAL jsonb_to_record(x.j) r(vendor text, "date" date, instrument text) ON TRUE \ No newline at end of file