From 7643a6961d26870e99390a79bd4449f11eda7d0b Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Sat, 23 Mar 2019 17:17:46 -0400 Subject: [PATCH] format --- route_sql/list_changes.sql | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/route_sql/list_changes.sql b/route_sql/list_changes.sql index 34f04a4..596c056 100644 --- a/route_sql/list_changes.sql +++ b/route_sql/list_changes.sql @@ -1,21 +1,21 @@ -WITH -list AS ( -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 - AND iterdef @> $$replace_user$$::jsonb -GROUP BY - iterdef->>'user', - iterdef->>'stamp', - iterdef->>'message', - iterdef -) -SELECT +WITH +list AS ( +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 + AND iterdef @> $$replace_user$$::jsonb +GROUP BY + iterdef->>'user', + iterdef->>'stamp', + iterdef->>'message', + iterdef +) +SELECT jsonb_agg(row_to_json(list)::jsonb) x from list \ No newline at end of file