From a2a7bee6e04ec485f82c400ec69d64e8e0c755a8 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 6 May 2020 17:43:13 -0400 Subject: [PATCH] delete accidental cross-over update --- build/edit_xover.sql | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 build/edit_xover.sql diff --git a/build/edit_xover.sql b/build/edit_xover.sql new file mode 100644 index 0000000..27b9541 --- /dev/null +++ b/build/edit_xover.sql @@ -0,0 +1,33 @@ +begin; + +WITH d AS ( +DELETE FROM + rlarp.osm_pool +WHERE + logid IN ( + SELECT + p.logid + --jsonb_agg(DISTINCT p.quota_rep_descr), + --l.doc->>'user' usr, + --l.doc->>'message' com, + --(l.doc->>'stamp')::timestamp stamp, + ,sum(value_usd) value_usd + FROM + rlarp.osm_pool p + INNER JOIN rlarp.osm_log l ON + l.id = p.logid + WHERE + l.doc->>'user' = 'Baggetta, Antony' + AND dsm NOT IN ('10023','10026','10032','30010','30033','30035','90050') + --quota_rep_descr IN ('JORDAN BUKOWSKI' ,'RICHARD MEULE') + AND logid > 1 + GROUP BY + p.logid + --p.quota_rep_descr, + --l.doc->>'user', + --l.doc->>'message', + --(l.doc->>'stamp')::timestamp + ) + AND dsm NOT IN ('10023','10026','10032','30010','30033','30035','90050') +) +SELECT * FROM d \ No newline at end of file