From 552033744602eaf73eb6fddab0e7f8815b5e4fd6 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 12 Jul 2021 15:33:17 -0400 Subject: [PATCH] summary of pool by month --- inquirey/months.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 inquirey/months.sql diff --git a/inquirey/months.sql b/inquirey/months.sql new file mode 100644 index 0000000..c144773 --- /dev/null +++ b/inquirey/months.sql @@ -0,0 +1,15 @@ +SELECT + order_month + ,SUM(value_usd) FILTER (WHERE order_season = 2021 AND iter = 'plan') plan2021 + ,SUM(value_usd) FILTER (WHERE order_season = 2022 AND iter = 'plan') plan2022 + ,SUM(value_usd) FILTER (WHERE order_season = 2021 AND iter = 'diff') diff2021 + ,SUM(value_usd) FILTER (WHERE order_season = 2022 AND iter = 'diff') diff2022 + ,SUM(value_usd) FILTER (WHERE order_season = 2021 AND iter = 'actuals') act2021 + ,SUM(value_usd) FILTER (WHERE order_season = 2022 AND iter = 'actuals') act2022 +FROM + rlarp.osm_pool +WHERE + order_season IN (2021,2022) + AND quota_rep_descr = 'COLIN MAXWELL' +GROUP BY + order_month