diff --git a/offline/last_price.sql b/offline/last_price.sql index f299e5c..305530d 100644 --- a/offline/last_price.sql +++ b/offline/last_price.sql @@ -332,6 +332,8 @@ WHERE AND o.units <> 0 ---only apply to 2022 orders---- AND o.order_date >= '2021-06-01' + --only include baseline stuff--- + AND iter IN ('actuals','copy','actuals_plug') ) -----------aggregate the impact------------ --SELECT * FROM ins limit 10000 diff --git a/route_sql/list_changes.sql b/route_sql/list_changes.sql index b00a269..8bd09d4 100644 --- a/route_sql/list_changes.sql +++ b/route_sql/list_changes.sql @@ -15,7 +15,7 @@ from id = logid WHERE quota_rep_descr = 'replace_user' - AND tag <> 'Initial Build' + AND tag NOT IN ('Initial Build','last price') group BY ol.doc->>'user' ,quota_rep_descr @@ -28,4 +28,4 @@ ORDER BY (ol.doc->>'stamp')::timestamptz desc ) SELECT - jsonb_agg(row_to_json(agg)::jsonb ORDER BY agg.stamp desc) x from agg \ No newline at end of file + jsonb_agg(row_to_json(agg)::jsonb ORDER BY agg.stamp desc) x from agg