2019-03-23 11:25:58 -04:00
|
|
|
SELECT
|
|
|
|
iterdef->>'user' "user",
|
2019-04-03 09:56:01 -04:00
|
|
|
quota_rep_descr,
|
2019-03-27 10:14:50 -04:00
|
|
|
(iterdef->>'stamp')::timestamptz "stamp",
|
2019-03-27 13:24:49 -04:00
|
|
|
iterdef->>'type' "type",
|
2019-03-23 11:25:58 -04:00
|
|
|
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',
|
2019-04-03 09:56:01 -04:00
|
|
|
quota_rep_descr,
|
2019-03-23 11:25:58 -04:00
|
|
|
iterdef->>'stamp',
|
2019-03-27 13:24:49 -04:00
|
|
|
iterdef->>'type',
|
2019-03-23 11:25:58 -04:00
|
|
|
iterdef
|
2019-03-27 10:14:50 -04:00
|
|
|
ORDER BY
|
|
|
|
"stamp" DESC
|