format
This commit is contained in:
parent
1f9623e026
commit
7643a6961d
@ -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
|
Loading…
Reference in New Issue
Block a user