From 5534273f2e8965e5b26f7a0b949023a867336581 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Sat, 23 Mar 2019 10:25:58 -0500 Subject: [PATCH] add sql for a regular table output of changes --- route_sql/list_changes_table.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 route_sql/list_changes_table.sql diff --git a/route_sql/list_changes_table.sql b/route_sql/list_changes_table.sql new file mode 100644 index 0000000..a523deb --- /dev/null +++ b/route_sql/list_changes_table.sql @@ -0,0 +1,15 @@ +SELECT + iterdef->>'user' "user", + iterdef->>'stamp' "stamp", + iterdef->>'mesasage' "comment", + round(SUM(fb_val_loc * r_rate)::numeric,2) sales, + jsonb_pretty(iterdef) def +FROM + rlarp.osm_fcpool +WHERE + iterdef IS NOT NULL +GROUP BY + iterdef->>'user', + iterdef->>'stamp', + iterdef->>'message', + iterdef