queries to move sales around for high-level spreading

This commit is contained in:
Paul Trowbridge 2021-03-08 15:00:55 -05:00
parent 3b983140b6
commit d53c7bec0a
3 changed files with 444 additions and 0 deletions

View File

@ -0,0 +1,8 @@
SELECT
ship_cust_descr, order_date, ship_date, sum(value_usd) sales
from
rlarp.osm_pool
where
ship_season = 2021
group by
ship_cust_descr, order_date, ship_date;

View File

@ -0,0 +1,79 @@
BEGIN;
with
logl AS (
INSERT INTO
rlarp.osm_log(doc)
SELECT
jsonb_build_object(
'stamp',current_timestamp
,'user','Trowbridge, Paul'
,'source','script'
,'tag','remove other'
,'message','remove budget for quota reps rolling into director Other'
,'type','remove other'
,'version','b21'
) doc RETURNING *
)
,targ as (
select
p.fspr
,p.plnt
,p.promo
,p.terms
,p.bill_cust_descr
,p.ship_cust_descr
,p.dsm
,p.quota_rep_descr
,p.director
,p.billto_group
,p.shipto_group
,p.chan
,p.chansub
,p.chan_retail
,p.part
,p.part_descr
,p.part_group
,p.branding
,p.majg_descr
,p.ming_descr
,p.majs_descr
,p.mins_descr
,p.segm
,p.substance
,p.fs_line
,p.r_currency
,p.r_rate
,p.c_currency
,p.c_rate
,-p.units units
,-p.value_loc value_loc
,-p.value_usd value_usd
,-p.cost_loc cost_loc
,-p.cost_usd cost_usd
,p.calc_status
,p.flag
,p.order_date
,p.order_month
,p.order_season
,p.request_date
,p.request_month
,p.request_season
,p.ship_date
,p.ship_month
,p.ship_season
,'b21' AS version
,'adj volume' iter
,logl.id logid
,logl.doc->>'tag' tag
,logl.doc->>'message' "comment"
,logl.doc->>'type' module
from
rlarp.osm_pool p
CROSS JOIN logl
where
director = 'Other'
and (order_season >= 2021 or ship_season >= 2021)
)
INSERT INTO rlarp.osm_pool SELECT * FROM targ;
COMMIT;

View File

@ -0,0 +1,357 @@
BEGIN;
WITH
move AS (
SELECT * FROM (VALUES
('HOME0004 - ALLIANCE INTERNATIONAL LLC',CAST('10/7/2019' AS DATE),CAST('6/1/2020' AS DATE),11322.85,CAST('7/2/2020' AS DATE)),
('CORS0004 - CORSOS PERENNIALS',CAST('10/23/2019' AS DATE),CAST('6/1/2020' AS DATE),30916.44,CAST('7/2/2020' AS DATE)),
('MONR0007 - MONROVIA - VISALIA CA',CAST('2/3/2020' AS DATE),CAST('6/1/2020' AS DATE),8409.6,CAST('7/2/2020' AS DATE)),
('BATT0001 - BATTLEFIELD FARMS',CAST('2/5/2020' AS DATE),CAST('6/1/2020' AS DATE),2285,CAST('7/2/2020' AS DATE)),
('BABI0001 - BABIKOW GREENHOUSES',CAST('2/7/2020' AS DATE),CAST('6/1/2020' AS DATE),9640.8,CAST('7/2/2020' AS DATE)),
('KALA0002 - KALAMAZOO FLOWER GROUP LLC',CAST('2/10/2020' AS DATE),CAST('6/1/2020' AS DATE),1005.4,CAST('7/2/2020' AS DATE)),
('HATR0001 - H.A. TREICHLER SONS',CAST('2/11/2020' AS DATE),CAST('6/1/2020' AS DATE),13425.44,CAST('7/2/2020' AS DATE)),
('KALA0002 - KALAMAZOO FLOWER GROUP LLC',CAST('3/13/2020' AS DATE),CAST('6/1/2020' AS DATE),2464,CAST('7/2/2020' AS DATE)),
('METR0002 - METROLINA GREENHOUSES',CAST('3/17/2020' AS DATE),CAST('6/1/2020' AS DATE),17619.12,CAST('7/2/2020' AS DATE)),
('JOHN0020 - JOHN BARONEDBA BARONE FARM',CAST('3/23/2020' AS DATE),CAST('6/1/2020' AS DATE),5571.85,CAST('7/2/2020' AS DATE)),
('JENS0002 - JENSEN DISTRIBUTION SERVICES',CAST('3/24/2020' AS DATE),CAST('6/1/2020' AS DATE),487.15,CAST('7/2/2020' AS DATE)),
('DIST0007 - TERIS SERVICES-PICK UP ONLY U',CAST('3/31/2020' AS DATE),CAST('6/1/2020' AS DATE),5318.78,CAST('7/2/2020' AS DATE)),
('DIST0007 - TERIS SERVICES-PICK UP ONLY U',CAST('4/7/2020' AS DATE),CAST('6/1/2020' AS DATE),400.28,CAST('7/2/2020' AS DATE)),
('BELA0001 - BELA FLOR NURSERIES',CAST('4/15/2020' AS DATE),CAST('6/1/2020' AS DATE),1219.71,CAST('7/2/2020' AS DATE)),
('JENS0002 - JENSEN DISTRIBUTION SERVICES',CAST('4/15/2020' AS DATE),CAST('6/1/2020' AS DATE),395.01,CAST('7/2/2020' AS DATE)),
('LLNU0003 - LL NURSERY SUPPLY INC WA',CAST('4/16/2020' AS DATE),CAST('6/1/2020' AS DATE),656.7,CAST('7/2/2020' AS DATE)),
('INTE0003 - GREENHOUSE MEGASTORE',CAST('4/23/2020' AS DATE),CAST('6/1/2020' AS DATE),283.06,CAST('7/2/2020' AS DATE)),
('CALC0004 - CAL COLOR GROWERS LLC',CAST('4/28/2020' AS DATE),CAST('6/1/2020' AS DATE),8273.25,CAST('7/2/2020' AS DATE)),
('BATT0001 - BATTLEFIELD FARMS',CAST('5/1/2020' AS DATE),CAST('6/1/2020' AS DATE),18919.26,CAST('7/2/2020' AS DATE)),
('LOWE3110 - LOWES OF MILTON CANADA # 3110',CAST('5/4/2020' AS DATE),CAST('6/1/2020' AS DATE),8901.3,CAST('7/2/2020' AS DATE)),
('SILV0007 - SILVERLEAF GHSE',CAST('5/6/2020' AS DATE),CAST('6/1/2020' AS DATE),19368.3,CAST('7/2/2020' AS DATE)),
('HOME0004 - ALLIANCE INTERNATIONAL LLC',CAST('5/11/2020' AS DATE),CAST('6/1/2020' AS DATE),6312.37,CAST('7/2/2020' AS DATE)),
('SHAD0009 - SHADY CREEK GREENHOUSES',CAST('5/12/2020' AS DATE),CAST('6/1/2020' AS DATE),1395.9,CAST('7/2/2020' AS DATE)),
('ISLA0008 - ISLAND GROWER SUPPLIES LLC',CAST('5/13/2020' AS DATE),CAST('6/1/2020' AS DATE),2160,CAST('7/2/2020' AS DATE)),
('LYSH0001 - LYS HYDRO GARDEN FRESNO',CAST('5/13/2020' AS DATE),CAST('6/1/2020' AS DATE),5383.08,CAST('7/2/2020' AS DATE)),
('LLNU0003 - LL NURSERY SUPPLY INC WA',CAST('5/13/2020' AS DATE),CAST('6/1/2020' AS DATE),667.89,CAST('7/2/2020' AS DATE)),
('STAN0009 - STANDEX ELECTRONICS',CAST('5/15/2020' AS DATE),CAST('6/1/2020' AS DATE),47.25,CAST('7/2/2020' AS DATE)),
('BRAD0020 - BRADFORD CO-OP STORAGE LTD (U)',CAST('5/15/2020' AS DATE),CAST('6/1/2020' AS DATE),460.8,CAST('7/2/2020' AS DATE)),
('CANA0034 - CANADIAN TIRE RETAIL DC 9004',CAST('5/16/2020' AS DATE),CAST('6/1/2020' AS DATE),4908.09,CAST('7/2/2020' AS DATE)),
('AJBI0001 - AJ BILLES DC CANADIAN TIRE',CAST('5/16/2020' AS DATE),CAST('6/1/2020' AS DATE),29620.77,CAST('7/2/2020' AS DATE)),
('LOWE3110 - LOWES OF MILTON CANADA # 3110',CAST('5/18/2020' AS DATE),CAST('6/1/2020' AS DATE),1595.47,CAST('7/2/2020' AS DATE)),
('BATT0001 - BATTLEFIELD FARMS',CAST('5/19/2020' AS DATE),CAST('6/1/2020' AS DATE),2088,CAST('7/2/2020' AS DATE)),
('HYDR0010 - HYDROFARM INC',CAST('5/20/2020' AS DATE),CAST('6/1/2020' AS DATE),22368.8,CAST('7/2/2020' AS DATE)),
('WILD0012 - WILDWOODS-PACIFIC NURSERY POTS',CAST('5/20/2020' AS DATE),CAST('6/1/2020' AS DATE),4180,CAST('7/2/2020' AS DATE)),
('GULF0002 - SUNBLEST GARDENS',CAST('5/20/2020' AS DATE),CAST('6/1/2020' AS DATE),21501.89,CAST('7/2/2020' AS DATE)),
('LOUI0001 - LOUIS DAVINO SR LLC',CAST('5/20/2020' AS DATE),CAST('6/1/2020' AS DATE),38150.76,CAST('7/2/2020' AS DATE)),
('DIST0007 - TERIS SERVICES-PICK UP ONLY U',CAST('5/21/2020' AS DATE),CAST('6/1/2020' AS DATE),3626.73,CAST('7/2/2020' AS DATE)),
('FRED0038 - FRED MEYER STORES',CAST('5/21/2020' AS DATE),CAST('6/1/2020' AS DATE),38706.76,CAST('7/2/2020' AS DATE)),
('LLNU0003 - LL NURSERY SUPPLY INC WA',CAST('5/21/2020' AS DATE),CAST('6/1/2020' AS DATE),3205.89,CAST('7/2/2020' AS DATE)),
('DOIT0008 - DO IT BEST CORP',CAST('5/21/2020' AS DATE),CAST('6/1/2020' AS DATE),551.34,CAST('7/2/2020' AS DATE)),
('BATT0001 - BATTLEFIELD FARMS',CAST('5/21/2020' AS DATE),CAST('6/1/2020' AS DATE),25150,CAST('7/2/2020' AS DATE)),
('AJBI0001 - AJ BILLES DC CANADIAN TIRE',CAST('5/23/2020' AS DATE),CAST('6/1/2020' AS DATE),339.94,CAST('7/2/2020' AS DATE)),
('AMAZ0033 - AMAZON.COM SERVICES,INC.',CAST('5/25/2020' AS DATE),CAST('6/1/2020' AS DATE),998.94,CAST('7/2/2020' AS DATE)),
('AMAZ0134 - AMAZON LGB6',CAST('5/25/2020' AS DATE),CAST('6/1/2020' AS DATE),1058.85,CAST('7/2/2020' AS DATE)),
('AMAZ0115 - AMAZON.COM LGB4 LLC',CAST('5/25/2020' AS DATE),CAST('6/1/2020' AS DATE),743.79,CAST('7/2/2020' AS DATE)),
('AMAZ0093 - AMAZON.COM SERVICES,INC.',CAST('5/25/2020' AS DATE),CAST('6/1/2020' AS DATE),3087.16,CAST('7/2/2020' AS DATE)),
('AMAZ0055 - AMAZON.COM SERVICES,INC.',CAST('5/25/2020' AS DATE),CAST('6/1/2020' AS DATE),772.44,CAST('7/2/2020' AS DATE)),
('AMAZ0008 - AMAZON.COM SERVICES,INC.',CAST('5/25/2020' AS DATE),CAST('6/1/2020' AS DATE),1735.38,CAST('7/2/2020' AS DATE)),
('AMAZ0123 - AMAZON.COM SERVICES,INC.',CAST('5/25/2020' AS DATE),CAST('6/1/2020' AS DATE),720.9,CAST('7/2/2020' AS DATE)),
('AMAZ0156 - AMAZON - MEM1',CAST('5/25/2020' AS DATE),CAST('6/1/2020' AS DATE),750.12,CAST('7/2/2020' AS DATE)),
('FRED0038 - FRED MEYER STORES',CAST('5/26/2020' AS DATE),CAST('6/1/2020' AS DATE),4972.75,CAST('7/2/2020' AS DATE)),
('INTE0003 - GREENHOUSE MEGASTORE',CAST('5/26/2020' AS DATE),CAST('6/1/2020' AS DATE),16602.93,CAST('7/2/2020' AS DATE)),
('AMAZ0156 - AMAZON - MEM1',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),14.46,CAST('7/2/2020' AS DATE)),
('AMAZ0159 - AMAZON - SCK1',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),27.27,CAST('7/2/2020' AS DATE)),
('AMAZ0045 - AMAZON.COM SERVICES,INC.',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),27.27,CAST('7/2/2020' AS DATE)),
('STON0028 - STONINGTON GARDENS',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),1370.99,CAST('7/2/2020' AS DATE)),
('AMAZ0083 - AMAZON.COM SERVICES,INC.',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),130.14,CAST('7/2/2020' AS DATE)),
('AMAZ0073 - AMAZON.COM SERVICES,INC.',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),27.27,CAST('7/2/2020' AS DATE)),
('AMAZ0012 - AMAZON.COM SERVICES,INC.',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),28.92,CAST('7/2/2020' AS DATE)),
('AMAZ0127 - AMAZON.COM SERVICES,INC.',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),27.27,CAST('7/2/2020' AS DATE)),
('AMAZ0093 - AMAZON.COM SERVICES,INC.',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),14.46,CAST('7/2/2020' AS DATE)),
('AMAZ0043 - AMAZON.COM SERVICES,INC.',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),27.27,CAST('7/2/2020' AS DATE)),
('AMAZ0140 - AMAZON - CLT3',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),27.27,CAST('7/2/2020' AS DATE)),
('AMAZ0114 - AMAZON.COM SERVICES,INC.',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),81.81,CAST('7/2/2020' AS DATE)),
('COPP0002 - COPPERSTATE FARMS MGMT LLC',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),16156.8,CAST('7/2/2020' AS DATE)),
('AMAZ0148 - AMAZON - IND9 9912622',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),14.46,CAST('7/2/2020' AS DATE)),
('AMAZ0144 - AMAZON - CMH3',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),27.27,CAST('7/2/2020' AS DATE)),
('INTE0003 - GREENHOUSE MEGASTORE',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),16810.8,CAST('7/2/2020' AS DATE)),
('DCME0009 - 9 DIS ASM DC 7103 MERCH WM',CAST('5/27/2020' AS DATE),CAST('6/1/2020' AS DATE),26970.81,CAST('7/2/2020' AS DATE)),
('AMAZ0019 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('7/2/2020' AS DATE)),
('AMAZ0155 - AMAZON - XIX7',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('7/2/2020' AS DATE)),
('AMAZ0107 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),65.4,CAST('7/2/2020' AS DATE)),
('AMAZ0099 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('7/2/2020' AS DATE)),
('AMAZ0108 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('7/2/2020' AS DATE)),
('AMAZ0090 - AMAZON.COM FULFILLMENT CTRCHH2',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('7/2/2020' AS DATE)),
('GOLD0038 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('7/2/2020' AS DATE)),
('GASK0001 - GASKO GREENHOUSES',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),39166.05,CAST('7/2/2020' AS DATE)),
('EAGL0001 - EAGLE CREEK WHOLESALE',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),489.5,CAST('8/2/2020' AS DATE)),
('AMAZ0123 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('8/2/2020' AS DATE)),
('AMAZ0127 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('8/2/2020' AS DATE)),
('AMAZ0029 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('8/2/2020' AS DATE)),
('DIST0007 - TERIS SERVICES-PICK UP ONLY U',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),19122.39,CAST('8/2/2020' AS DATE)),
('BEAU0002 - BEAUTIFUL LAND PRODUCTS',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),282.85,CAST('8/2/2020' AS DATE)),
('AMAZ0068 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('8/2/2020' AS DATE)),
('AMAZ0045 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('8/2/2020' AS DATE)),
('AMAZ0121 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('8/2/2020' AS DATE)),
('AMAZ0058 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('8/2/2020' AS DATE)),
('AMAZ0051 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('8/2/2020' AS DATE)),
('DEWA0001 - DEWAR NURSERIES',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),24181.3,CAST('8/2/2020' AS DATE)),
('AMAZ0091 - AMAZON.COM SERVICES,INC.',CAST('5/28/2020' AS DATE),CAST('6/1/2020' AS DATE),46.32,CAST('8/2/2020' AS DATE)),
('LUPI0001 - LUPINE LADY PORCUPINE GNHSE',CAST('5/29/2020' AS DATE),CAST('6/1/2020' AS DATE),112.42,CAST('8/2/2020' AS DATE)),
('YODE0010 - YODERS PRODUCE INC',CAST('5/29/2020' AS DATE),CAST('6/1/2020' AS DATE),228.75,CAST('8/2/2020' AS DATE)),
('JACK0020 - JACKSON COUNTY ARC INC',CAST('5/29/2020' AS DATE),CAST('6/1/2020' AS DATE),63.2,CAST('8/2/2020' AS DATE)),
('RAND0011 - RANDY WESTRATE GREENHOUSE',CAST('5/29/2020' AS DATE),CAST('6/1/2020' AS DATE),420.75,CAST('8/2/2020' AS DATE)),
('JOSE0006 - JOSE OCHOA',CAST('5/29/2020' AS DATE),CAST('6/1/2020' AS DATE),520.86,CAST('8/2/2020' AS DATE)),
('WERA0001 - WE RADTKE INC',CAST('5/30/2020' AS DATE),CAST('6/1/2020' AS DATE),1747.05,CAST('8/2/2020' AS DATE)),
('ERNS0003 - ERNST NURSERY',CAST('9/9/2019' AS DATE),CAST('6/2/2020' AS DATE),23493.6,CAST('8/2/2020' AS DATE)),
('SANM0002 - SAN MARCOS-AMER HORT SUPPLY',CAST('10/7/2019' AS DATE),CAST('6/2/2020' AS DATE),23118.67,CAST('8/2/2020' AS DATE)),
('CORS0004 - CORSOS PERENNIALS',CAST('10/23/2019' AS DATE),CAST('6/2/2020' AS DATE),18034.59,CAST('8/2/2020' AS DATE)),
('ALTM0034 - ALTMAN PLANTS - SALINAS',CAST('11/15/2019' AS DATE),CAST('6/2/2020' AS DATE),6092.7,CAST('8/2/2020' AS DATE)),
('ALTM0021 - ALTMANS SPECIALTY PLANTS PERRI',CAST('11/15/2019' AS DATE),CAST('6/2/2020' AS DATE),36831.64,CAST('8/2/2020' AS DATE)),
('WILL0064 - WILLOWBROOK NURSERIES INC',CAST('11/25/2019' AS DATE),CAST('6/2/2020' AS DATE),3474,CAST('8/2/2020' AS DATE)),
('CAVI0001 - CAVICCHIO GREENHOUSES INC',CAST('12/10/2019' AS DATE),CAST('6/2/2020' AS DATE),12716.82,CAST('8/2/2020' AS DATE)),
('ENVI0008 - EVL NURSERY',CAST('12/16/2019' AS DATE),CAST('6/2/2020' AS DATE),3551.31,CAST('8/2/2020' AS DATE)),
('MONR0018 - MONROVIA - DAYTON OR',CAST('1/6/2020' AS DATE),CAST('6/2/2020' AS DATE),29433.6,CAST('8/2/2020' AS DATE)),
('WALD0003 - WALDO ASSOCIATES',CAST('1/30/2020' AS DATE),CAST('6/2/2020' AS DATE),924.93,CAST('8/2/2020' AS DATE)),
('METR0002 - METROLINA GREENHOUSES',CAST('2/11/2020' AS DATE),CAST('6/2/2020' AS DATE),13200,CAST('8/2/2020' AS DATE)),
('HEAR0011 - HEARTLAND-SUN WAREHOUSE24HR N',CAST('2/28/2020' AS DATE),CAST('6/2/2020' AS DATE),4442.04,CAST('8/2/2020' AS DATE)),
('FORE0005 - FOREST GLEN GREENHOUSES (C)',CAST('3/4/2020' AS DATE),CAST('6/2/2020' AS DATE),1747.44,CAST('8/2/2020' AS DATE)),
('VPNU0002 - VP NURSERY',CAST('3/6/2020' AS DATE),CAST('6/2/2020' AS DATE),19356.48,CAST('8/2/2020' AS DATE)),
('ACOS0002 - ACOSTA FARMS NURSERY INC',CAST('3/9/2020' AS DATE),CAST('6/2/2020' AS DATE),4391.78,CAST('8/2/2020' AS DATE)),
('ACOS0002 - ACOSTA FARMS NURSERY INC',CAST('3/10/2020' AS DATE),CAST('6/2/2020' AS DATE),8700,CAST('8/2/2020' AS DATE)),
('PLEA0026 - PLEASANT VALLEY FARM INC',CAST('3/11/2020' AS DATE),CAST('6/2/2020' AS DATE),731.2,CAST('8/2/2020' AS DATE)),
('ROCK0026 - ROCKWELL FARMS',CAST('3/16/2020' AS DATE),CAST('6/2/2020' AS DATE),15949.44,CAST('8/2/2020' AS DATE)),
('CLEA0015 - CLEARVIEW GREENHOUSES',CAST('3/16/2020' AS DATE),CAST('6/2/2020' AS DATE),6698.45,CAST('8/2/2020' AS DATE)),
('OLDN0001 - OLD NORTH GROWERS',CAST('3/16/2020' AS DATE),CAST('6/2/2020' AS DATE),7484.51,CAST('8/2/2020' AS DATE)),
('METR0002 - METROLINA GREENHOUSES',CAST('3/17/2020' AS DATE),CAST('6/2/2020' AS DATE),6767.1,CAST('8/2/2020' AS DATE)),
('BAMA0001 - BAMA GREEN',CAST('3/17/2020' AS DATE),CAST('6/2/2020' AS DATE),13264.85,CAST('8/2/2020' AS DATE)),
('WALD0003 - WALDO ASSOCIATES',CAST('3/18/2020' AS DATE),CAST('6/2/2020' AS DATE),1234.9,CAST('8/2/2020' AS DATE)),
('TREE0044 - TREESAP FARMS-FOREST GROVE OR',CAST('3/24/2020' AS DATE),CAST('6/2/2020' AS DATE),3047.22,CAST('8/2/2020' AS DATE)),
('HEAR0011 - HEARTLAND-SUN WAREHOUSE24HR N',CAST('3/24/2020' AS DATE),CAST('6/2/2020' AS DATE),271,CAST('8/2/2020' AS DATE)),
('YOUN0005 - YOUNGS PLANT FARM INC - FARM 2',CAST('3/25/2020' AS DATE),CAST('6/2/2020' AS DATE),44807.6,CAST('8/2/2020' AS DATE)),
('YOUN0004 - YOUNGS PLANT FARM INC - FARM 1',CAST('3/25/2020' AS DATE),CAST('6/2/2020' AS DATE),27216.51,CAST('8/2/2020' AS DATE)),
('DIXI0001 - DIXIE GREEN INC.',CAST('3/26/2020' AS DATE),CAST('6/2/2020' AS DATE),8568,CAST('8/2/2020' AS DATE)),
('WILL0028 - WILLIAMS PLANT FARM',CAST('3/31/2020' AS DATE),CAST('6/2/2020' AS DATE),2812.5,CAST('8/2/2020' AS DATE)),
('PLEA0026 - PLEASANT VALLEY FARM INC',CAST('4/2/2020' AS DATE),CAST('6/2/2020' AS DATE),468.18,CAST('8/2/2020' AS DATE)),
('SPAR0001 - SPARETIME SUPPLY',CAST('4/2/2020' AS DATE),CAST('6/2/2020' AS DATE),17690.4,CAST('8/2/2020' AS DATE)),
('HYDR0010 - HYDROFARM INC',CAST('4/3/2020' AS DATE),CAST('6/2/2020' AS DATE),19445.93,CAST('8/2/2020' AS DATE)),
('CARL0001 - CARL BREHOB SON',CAST('4/10/2020' AS DATE),CAST('6/2/2020' AS DATE),450.6,CAST('8/2/2020' AS DATE)),
('ALPH0003 - ALPHA FOLIAGE',CAST('4/13/2020' AS DATE),CAST('6/2/2020' AS DATE),16207.16,CAST('8/2/2020' AS DATE)),
('FISH0009 - FISHER NURSERY INC - CA',CAST('4/13/2020' AS DATE),CAST('6/2/2020' AS DATE),2211.86,CAST('8/2/2020' AS DATE)),
('WALD0003 - WALDO ASSOCIATES',CAST('4/14/2020' AS DATE),CAST('6/2/2020' AS DATE),2769.33,CAST('8/2/2020' AS DATE)),
('ROCK0026 - ROCKWELL FARMS',CAST('4/15/2020' AS DATE),CAST('6/2/2020' AS DATE),5061.84,CAST('8/2/2020' AS DATE)),
('SCOT0019 - SCOTTS NURSERY LTD (C)',CAST('4/17/2020' AS DATE),CAST('6/2/2020' AS DATE),18909.45,CAST('8/2/2020' AS DATE)),
('GRIF0001 - GRIFFIN GREENHOUSE - TEWKSBURY',CAST('4/17/2020' AS DATE),CAST('6/2/2020' AS DATE),172.4,CAST('8/2/2020' AS DATE)),
('WALD0003 - WALDO ASSOCIATES',CAST('4/22/2020' AS DATE),CAST('6/2/2020' AS DATE),607.81,CAST('8/2/2020' AS DATE)),
('KMNU0003 - KM NURSERY',CAST('4/22/2020' AS DATE),CAST('6/2/2020' AS DATE),30531.6,CAST('8/2/2020' AS DATE)),
('SPAR0001 - SPARETIME SUPPLY',CAST('4/27/2020' AS DATE),CAST('6/2/2020' AS DATE),6633.9,CAST('2/2/2021' AS DATE)),
('GRIF0001 - GRIFFIN GREENHOUSE - TEWKSBURY',CAST('4/28/2020' AS DATE),CAST('6/2/2020' AS DATE),8518.61,CAST('2/2/2021' AS DATE)),
('GRIF0001 - GRIFFIN GREENHOUSE - TEWKSBURY',CAST('4/29/2020' AS DATE),CAST('6/2/2020' AS DATE),926.2,CAST('2/2/2021' AS DATE)),
('GRIF0001 - GRIFFIN GREENHOUSE - TEWKSBURY',CAST('4/30/2020' AS DATE),CAST('6/2/2020' AS DATE),6024.27,CAST('2/2/2021' AS DATE)),
('AJBI0001 - AJ BILLES DC CANADIAN TIRE',CAST('5/2/2020' AS DATE),CAST('6/2/2020' AS DATE),752.43,CAST('2/2/2021' AS DATE)),
('CARL0001 - CARL BREHOB SON',CAST('5/6/2020' AS DATE),CAST('6/2/2020' AS DATE),627.25,CAST('2/2/2021' AS DATE)),
('ENVI0008 - EVL NURSERY',CAST('5/6/2020' AS DATE),CAST('6/2/2020' AS DATE),1587.84,CAST('2/2/2021' AS DATE)),
('WALD0003 - WALDO ASSOCIATES',CAST('5/7/2020' AS DATE),CAST('6/2/2020' AS DATE),1734.3,CAST('2/2/2021' AS DATE)),
('LOWE3110 - LOWES OF MILTON CANADA # 3110',CAST('5/11/2020' AS DATE),CAST('6/2/2020' AS DATE),3066.42,CAST('2/2/2021' AS DATE)),
('BUCK0006 - BUCKHORN NURSERY',CAST('5/11/2020' AS DATE),CAST('6/2/2020' AS DATE),1804,CAST('2/2/2021' AS DATE)),
('GRIF0001 - GRIFFIN GREENHOUSE - TEWKSBURY',CAST('5/12/2020' AS DATE),CAST('6/2/2020' AS DATE),73.8,CAST('2/2/2021' AS DATE)),
('WALD0003 - WALDO ASSOCIATES',CAST('5/13/2020' AS DATE),CAST('6/2/2020' AS DATE),5142.12,CAST('2/2/2021' AS DATE)),
('WHIT0003 - WHITES NURSERY',CAST('5/14/2020' AS DATE),CAST('6/2/2020' AS DATE),1859.68,CAST('2/2/2021' AS DATE)),
('MENA3339 - MENARDS INC',CAST('5/18/2020' AS DATE),CAST('6/2/2020' AS DATE),1974.54,CAST('2/2/2021' AS DATE)),
('WEST0646 - NUTRIEN AG SOL. - WATSONVILLE',CAST('5/18/2020' AS DATE),CAST('6/2/2020' AS DATE),9660.19,CAST('2/2/2021' AS DATE)),
('HOMU5089 - THE HOME DEPOT #5089 PICK UP',CAST('5/19/2020' AS DATE),CAST('6/2/2020' AS DATE),4166.76,CAST('2/2/2021' AS DATE)),
('HOMU5642 - THE HOME DEPOT #5642 PICK UP',CAST('5/19/2020' AS DATE),CAST('6/2/2020' AS DATE),7687.15,CAST('2/2/2021' AS DATE)),
('HOMU5030 - THE HOME DEPOT #5030 PICK UP',CAST('5/19/2020' AS DATE),CAST('6/2/2020' AS DATE),4395.64,CAST('2/2/2021' AS DATE)),
('HYDR0010 - HYDROFARM INC',CAST('5/20/2020' AS DATE),CAST('6/2/2020' AS DATE),12492.62,CAST('2/2/2021' AS DATE)),
('CARL0001 - CARL BREHOB SON',CAST('5/20/2020' AS DATE),CAST('6/2/2020' AS DATE),1747.28,CAST('2/2/2021' AS DATE)),
('HOMU5034 - THE HOME DEPOT #5034 PICK UP',CAST('5/21/2020' AS DATE),CAST('6/2/2020' AS DATE),18292.72,CAST('2/2/2021' AS DATE)),
('GRIF0001 - GRIFFIN GREENHOUSE - TEWKSBURY',CAST('5/21/2020' AS DATE),CAST('6/2/2020' AS DATE),1104.45,CAST('2/2/2021' AS DATE)),
('WOOD0001 - WOODBURN NURSERY',CAST('5/21/2020' AS DATE),CAST('6/2/2020' AS DATE),6138,CAST('2/2/2021' AS DATE)),
('ROBE0014 - ROBERTAS YOUNG PLANTS',CAST('5/21/2020' AS DATE),CAST('6/2/2020' AS DATE),9819.29,CAST('2/2/2021' AS DATE)),
('HOMU5084 - THE HOME DEPOT #5084 PICK UP',CAST('5/22/2020' AS DATE),CAST('6/2/2020' AS DATE),6897.97,CAST('2/2/2021' AS DATE)),
('CASS0002 - CASSCO',CAST('5/22/2020' AS DATE),CAST('6/2/2020' AS DATE),20617.7,CAST('2/2/2021' AS DATE)),
('HOMU5085 - THE HOME DEPOT #5085 PICK UP',CAST('5/22/2020' AS DATE),CAST('6/2/2020' AS DATE),17337.57,CAST('2/2/2021' AS DATE)),
('HOMU5089 - THE HOME DEPOT #5089 PICK UP',CAST('5/22/2020' AS DATE),CAST('6/2/2020' AS DATE),9208.18,CAST('2/2/2021' AS DATE)),
('HOMU5643 - THE HOME DEPOT #5643 PICK UP',CAST('5/22/2020' AS DATE),CAST('6/2/2020' AS DATE),963.84,CAST('2/2/2021' AS DATE)),
('HOMU5642 - THE HOME DEPOT #5642 PICK UP',CAST('5/22/2020' AS DATE),CAST('6/2/2020' AS DATE),576.04,CAST('2/2/2021' AS DATE)),
('HOMU5520 - THE HOME DEPOT #5520 PICK UP',CAST('5/22/2020' AS DATE),CAST('6/2/2020' AS DATE),7713.04,CAST('2/2/2021' AS DATE)),
('HOMU5030 - THE HOME DEPOT #5030 PICK UP',CAST('5/22/2020' AS DATE),CAST('6/2/2020' AS DATE),5072.52,CAST('2/2/2021' AS DATE)),
('AMAZ0058 - AMAZON.COM SERVICES,INC.',CAST('5/25/2020' AS DATE),CAST('6/2/2020' AS DATE),578.27,CAST('2/2/2021' AS DATE)),
('LOWE3110 - LOWES OF MILTON CANADA # 3110',CAST('5/25/2020' AS DATE),CAST('6/2/2020' AS DATE),1637.71,CAST('2/2/2021' AS DATE)),
('AMAZ0006 - AMAZON.COM SERVICES,INC.',CAST('5/25/2020' AS DATE),CAST('6/2/2020' AS DATE),2438.8,CAST('2/2/2021' AS DATE)),
('AMAZ0085 - AMAZON.COM SERVICES,INC.',CAST('5/25/2020' AS DATE),CAST('6/2/2020' AS DATE),2800.81,CAST('2/2/2021' AS DATE)),
('HOMU5851 - THE HOME DEPOT #5851 PICK UP',CAST('5/26/2020' AS DATE),CAST('6/2/2020' AS DATE),19600.94,CAST('2/2/2021' AS DATE)),
('HOMU5520 - THE HOME DEPOT #5520 PICK UP',CAST('5/26/2020' AS DATE),CAST('6/2/2020' AS DATE),10885.09,CAST('5/2/2021' AS DATE)),
('HOMU5084 - THE HOME DEPOT #5084 PICK UP',CAST('5/26/2020' AS DATE),CAST('6/2/2020' AS DATE),3289.09,CAST('4/2/2021' AS DATE)),
('GRIF0001 - GRIFFIN GREENHOUSE - TEWKSBURY',CAST('5/26/2020' AS DATE),CAST('6/2/2020' AS DATE),1422.36,CAST('4/2/2021' AS DATE)),
('BRAN0014 - BRANTLEY NURSERIES-BUSHNELL',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),9762.48,CAST('5/2/2021' AS DATE)),
('BWIC000G - BWI - SPRINGFIELD MO',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),12315.24,CAST('3/2/2021' AS DATE)),
('GRIF0001 - GRIFFIN GREENHOUSE - TEWKSBURY',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),408,CAST('3/2/2021' AS DATE)),
('DIST0004 - TERIS SVSC DAPPROVISIONNEMNTC',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),1942.22,CAST('3/2/2021' AS DATE)),
('WALM602A - WALMART DC 6002A-ASM DIS',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),30551,CAST('3/2/2021' AS DATE)),
('CASS0002 - CASSCO',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),6635.15,CAST('3/2/2021' AS DATE)),
('HOMU5087 - THE HOME DEPOT #5087 PICK UP',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),12138.15,CAST('3/2/2021' AS DATE)),
('TJSG0001 - TJS GREENHOUSE LANDSCAPE',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),1085.19,CAST('3/2/2021' AS DATE)),
('HOMU5642 - THE HOME DEPOT #5642 PICK UP',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),4149.17,CAST('3/2/2021' AS DATE)),
('SCMD0001 - SCM DC 6063A-ASM DIS WM PICKUP',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),18407.75,CAST('3/2/2021' AS DATE)),
('HOMU5639 - THE HOME DEPOT #5639 PICK UP',CAST('5/27/2020' AS DATE),CAST('6/2/2020' AS DATE),4594.91,CAST('3/2/2021' AS DATE)),
('GRIF0001 - GRIFFIN GREENHOUSE - TEWKSBURY',CAST('5/28/2020' AS DATE),CAST('6/2/2020' AS DATE),660.9,CAST('3/2/2021' AS DATE)),
('CWKI0001 - CW KITCHENS INC',CAST('5/28/2020' AS DATE),CAST('6/2/2020' AS DATE),780.23,CAST('3/2/2021' AS DATE)),
('LLNU0001 - LL NURSERY SUPPLY INC CA',CAST('5/28/2020' AS DATE),CAST('6/2/2020' AS DATE),40536.37,CAST('3/2/2021' AS DATE)),
('ROSE0026 - ROSEVILLE FARMS',CAST('5/29/2020' AS DATE),CAST('6/2/2020' AS DATE),10254.6,CAST('3/2/2021' AS DATE)),
('PLEA0026 - PLEASANT VALLEY FARM INC',CAST('5/29/2020' AS DATE),CAST('6/2/2020' AS DATE),12979.2,CAST('3/2/2021' AS DATE)),
('BRAD0020 - BRADFORD CO-OP STORAGE LTD (U)',CAST('5/29/2020' AS DATE),CAST('6/2/2020' AS DATE),5908.07,CAST('3/2/2021' AS DATE)),
('GLOB0004 - GLOBAL HORTICULTURAL INC (C)',CAST('5/31/2019' AS DATE),CAST('6/3/2020' AS DATE),4159.13,CAST('3/2/2021' AS DATE)),
('GREE0092 - GREENSCAPE',CAST('8/13/2019' AS DATE),CAST('6/3/2020' AS DATE),565.45,CAST('3/2/2021' AS DATE)),
('QUAL0021 - QUALITY GHSE SITE 2',CAST('8/15/2019' AS DATE),CAST('6/3/2020' AS DATE),28746.9,CAST('3/2/2021' AS DATE)),
('MARK0020 - MARKET BASKET OF ST PETERS #6',CAST('9/5/2019' AS DATE),CAST('6/3/2020' AS DATE),89.16,CAST('3/2/2021' AS DATE)),
('TWIN0007 - TWIN OAKS GROWERS',CAST('9/9/2019' AS DATE),CAST('6/3/2020' AS DATE),2310,CAST('3/2/2021' AS DATE)),
('UCGM0001 - UGC - MARKET BASKET',CAST('9/17/2019' AS DATE),CAST('6/3/2020' AS DATE),133.77,CAST('3/2/2021' AS DATE)),
('DREA0005 - DREAMS WITH COLORS INC',CAST('10/3/2019' AS DATE),CAST('6/3/2020' AS DATE),11549.2,CAST('4/2/2021' AS DATE)),
('RSGR0004 - RS GROWERS SUPPLY INC',CAST('10/14/2019' AS DATE),CAST('6/3/2020' AS DATE),4339.84,CAST('4/2/2021' AS DATE)),
('WEAV0003 - WEAVERLAND VALLEY GREENHOUSE',CAST('10/18/2019' AS DATE),CAST('6/3/2020' AS DATE),1039.92,CAST('4/2/2021' AS DATE)),
('FOST0001 - FOSTERS INC RETAIL',CAST('10/22/2019' AS DATE),CAST('6/3/2020' AS DATE),1162.1,CAST('4/2/2021' AS DATE)),
('WETS0003 - BFG SUPPLY - HARRISONBURG(W13)',CAST('10/22/2019' AS DATE),CAST('6/3/2020' AS DATE),1788.07,CAST('4/2/2021' AS DATE)),
('BFGS0011 - BFG SUPPLY - ST PAUL',CAST('10/22/2019' AS DATE),CAST('6/3/2020' AS DATE),1448.7,CAST('4/2/2021' AS DATE)),
('BFGS0004 - BFG SUPPLY - GRAND RAPIDS(W04)',CAST('10/22/2019' AS DATE),CAST('6/3/2020' AS DATE),973.07,CAST('4/2/2021' AS DATE)),
('BFGS0015 - BFG SUPPLY - CHESWICK (W08)',CAST('10/23/2019' AS DATE),CAST('6/3/2020' AS DATE),2197.89,CAST('4/2/2021' AS DATE)),
('FOST0001 - FOSTERS INC RETAIL',CAST('10/25/2019' AS DATE),CAST('6/3/2020' AS DATE),1575.99,CAST('4/2/2021' AS DATE)),
('ARTK0002 - ART KNAPP - HESTIA PRODUCTIONS',CAST('10/28/2019' AS DATE),CAST('6/3/2020' AS DATE),610.56,CAST('4/2/2021' AS DATE)),
('EARL0012 - EARL MAY SEED NURSERY',CAST('10/28/2019' AS DATE),CAST('6/3/2020' AS DATE),174.23,CAST('4/2/2021' AS DATE)),
('DEGR0004 - DEGROOTS NURSERIES',CAST('10/31/2019' AS DATE),CAST('6/3/2020' AS DATE),205.12,CAST('4/2/2021' AS DATE)),
('PLAN0009 - PLANTERS SEED SPICE RET',CAST('11/1/2019' AS DATE),CAST('6/3/2020' AS DATE),234.61,CAST('4/2/2021' AS DATE)),
('CYGR0003 - CY GROWERS SUPPLIES LTD U',CAST('11/4/2019' AS DATE),CAST('6/3/2020' AS DATE),1566,CAST('4/2/2021' AS DATE)),
('BFGS0004 - BFG SUPPLY - GRAND RAPIDS(W04)',CAST('11/4/2019' AS DATE),CAST('6/3/2020' AS DATE),187.77,CAST('4/2/2021' AS DATE)),
('CISC0001 - CISCO COMPANIES (THE)',CAST('11/11/2019' AS DATE),CAST('6/3/2020' AS DATE),533.92,CAST('4/2/2021' AS DATE)),
('BERG0012 - BERGENS GREENHOUSE',CAST('11/12/2019' AS DATE),CAST('6/3/2020' AS DATE),84.46,CAST('4/2/2021' AS DATE)),
('BERG0029 - BERGEN NURSERY',CAST('11/12/2019' AS DATE),CAST('6/3/2020' AS DATE),759.73,CAST('4/2/2021' AS DATE)),
('GREE0223 - EDDIS WHOLESALE GDN SUPPLIES',CAST('11/13/2019' AS DATE),CAST('6/3/2020' AS DATE),87.58,CAST('4/2/2021' AS DATE)),
('KOLL0002 - KOLLMANS GREENHOUSE',CAST('11/15/2019' AS DATE),CAST('6/3/2020' AS DATE),174.67,CAST('4/2/2021' AS DATE)),
('ALTM0032 - ALTMAN PLANTS - TROUP',CAST('11/15/2019' AS DATE),CAST('6/3/2020' AS DATE),933,CAST('4/2/2021' AS DATE)),
('MISC0001 - MISC ACCT - (US )',CAST('11/18/2019' AS DATE),CAST('6/3/2020' AS DATE),0,CAST('4/2/2021' AS DATE)),
('DOIT0030 - DIB-ROLLIERS INC #4447',CAST('11/19/2019' AS DATE),CAST('6/3/2020' AS DATE),23.04,CAST('4/2/2021' AS DATE)),
('BWIC000T - BWI - TEXARKANA TX',CAST('11/20/2019' AS DATE),CAST('6/3/2020' AS DATE),21.77,CAST('4/2/2021' AS DATE)),
('GREE0005 - GREEN ISLAND DISTRIBUTORS INC.',CAST('11/20/2019' AS DATE),CAST('6/3/2020' AS DATE),156.56,CAST('4/2/2021' AS DATE)),
('MAPL0025 - MAPLE LEAF GARDEN',CAST('11/20/2019' AS DATE),CAST('6/3/2020' AS DATE),87.58,CAST('4/2/2021' AS DATE)),
('WYAT0007 - WYATT QUARLES SEED CO',CAST('11/21/2019' AS DATE),CAST('6/3/2020' AS DATE),506.32,CAST('4/2/2021' AS DATE)),
('BWIC000E - BWI - GREENVILLE-SPARTANBURG',CAST('11/22/2019' AS DATE),CAST('6/3/2020' AS DATE),662.73,CAST('4/2/2021' AS DATE)),
('HALI0002 - HALIFAX SEED DIST CENTER (C)',CAST('11/22/2019' AS DATE),CAST('6/3/2020' AS DATE),555.71,CAST('4/2/2021' AS DATE)),
('EDDI0001 - EDDIS WHOLESALE GDN SUPPLIES',CAST('12/2/2019' AS DATE),CAST('6/3/2020' AS DATE),86.01,CAST('4/2/2021' AS DATE)),
('MARI0030 - MARIA GARDENS',CAST('12/3/2019' AS DATE),CAST('6/3/2020' AS DATE),790.55,CAST('4/2/2021' AS DATE)),
('MARI0007 - MARIA GARDENS - N. ROYALTON',CAST('12/4/2019' AS DATE),CAST('6/3/2020' AS DATE),675.25,CAST('4/2/2021' AS DATE)),
('LLNU0003 - LL NURSERY SUPPLY INC WA',CAST('12/5/2019' AS DATE),CAST('6/3/2020' AS DATE),445.85,CAST('4/2/2021' AS DATE)),
('LLNU0001 - LL NURSERY SUPPLY INC CA',CAST('12/5/2019' AS DATE),CAST('6/3/2020' AS DATE),358.1,CAST('4/2/2021' AS DATE)),
('CAVI0001 - CAVICCHIO GREENHOUSES INC',CAST('12/6/2019' AS DATE),CAST('6/3/2020' AS DATE),2316.1,CAST('4/2/2021' AS DATE)),
('GRIF0010 - GRIFFIN GREENHOUSE - STAFFORD',CAST('12/6/2019' AS DATE),CAST('6/3/2020' AS DATE),527.51,CAST('4/2/2021' AS DATE)),
('BFGS0015 - BFG SUPPLY - CHESWICK (W08)',CAST('12/6/2019' AS DATE),CAST('6/3/2020' AS DATE),1640.54,CAST('4/2/2021' AS DATE)),
('COST0015 - COSTA FARMS-FOLIAGE DIV (CNF)',CAST('12/6/2019' AS DATE),CAST('6/3/2020' AS DATE),18673.2,CAST('4/2/2021' AS DATE)),
('BFGS0015 - BFG SUPPLY - CHESWICK (W08)',CAST('12/9/2019' AS DATE),CAST('6/3/2020' AS DATE),716.74,CAST('4/2/2021' AS DATE)),
('BFGS0004 - BFG SUPPLY - GRAND RAPIDS(W04)',CAST('12/9/2019' AS DATE),CAST('6/3/2020' AS DATE),521.93,CAST('4/2/2021' AS DATE)),
('HORI0005 - HORIZON DISTRIBUTION INC',CAST('12/10/2019' AS DATE),CAST('6/3/2020' AS DATE),133.47,CAST('4/2/2021' AS DATE)),
('CARL0002 - CARLIN HORTICULTURAL SUPP U',CAST('12/10/2019' AS DATE),CAST('6/3/2020' AS DATE),155.55,CAST('4/2/2021' AS DATE)),
('CAVI0001 - CAVICCHIO GREENHOUSES INC',CAST('12/10/2019' AS DATE),CAST('6/3/2020' AS DATE),1695.58,CAST('4/2/2021' AS DATE)),
('CARL0001 - CARL BREHOB SON',CAST('12/12/2019' AS DATE),CAST('6/3/2020' AS DATE),478.87,CAST('4/2/2021' AS DATE)),
('BWIC000G - BWI - SPRINGFIELD MO',CAST('12/12/2019' AS DATE),CAST('6/3/2020' AS DATE),68.23,CAST('4/2/2021' AS DATE)),
('GARD0095 - GARD N WISE SALT LAKE',CAST('12/12/2019' AS DATE),CAST('6/3/2020' AS DATE),214.58,CAST('4/2/2021' AS DATE)),
('GARD0122 - GARD N WISE DENVER',CAST('12/12/2019' AS DATE),CAST('6/3/2020' AS DATE),632.41,CAST('4/2/2021' AS DATE)),
('STRA0022 - STRADERS GARDEN SUPPLY',CAST('12/13/2019' AS DATE),CAST('6/3/2020' AS DATE),186.94,CAST('4/2/2021' AS DATE)),
('STRA0020 - STRADERS GARDEN CENTER #1',CAST('12/13/2019' AS DATE),CAST('6/3/2020' AS DATE),290.19,CAST('4/2/2021' AS DATE)),
('PLRO0001 - PL ROHRER BRO INC RET',CAST('12/13/2019' AS DATE),CAST('6/3/2020' AS DATE),21.77,CAST('4/2/2021' AS DATE)),
('STRA0001 - STRADERS GREENHOUSE-POWELL',CAST('12/13/2019' AS DATE),CAST('6/3/2020' AS DATE),119.62,CAST('4/2/2021' AS DATE)),
('STRA0023 - STRADERS GARDEN SUPPLY',CAST('12/13/2019' AS DATE),CAST('6/3/2020' AS DATE),186.94,CAST('4/2/2021' AS DATE)),
('STRA0002 - STRADERS GREENHOUSE-GROVE CITY',CAST('12/13/2019' AS DATE),CAST('6/3/2020' AS DATE),186.94,CAST('4/2/2021' AS DATE)),
('LUCA0001 - LUCAS GREENHOUSE',CAST('12/16/2019' AS DATE),CAST('6/3/2020' AS DATE),101062.73,CAST('4/2/2021' AS DATE)),
('ENVI0008 - EVL NURSERY',CAST('12/16/2019' AS DATE),CAST('6/3/2020' AS DATE),22023.66,CAST('4/2/2021' AS DATE)),
('WILD0012 - WILDWOODS-PACIFIC NURSERY POTS',CAST('12/16/2019' AS DATE),CAST('6/3/2020' AS DATE),14853.15,CAST('4/2/2021' AS DATE)),
('APAC0001 - APACHE SEEDS LTD',CAST('12/17/2019' AS DATE),CAST('6/3/2020' AS DATE),663.82,CAST('4/2/2021' AS DATE)),
('GALE0003 - GALES GARDEN CENTER',CAST('12/18/2019' AS DATE),CAST('6/3/2020' AS DATE),622.16,CAST('4/2/2021' AS DATE)),
('OTTO0004 - OTTEN BROS NRSY LANDSCPG INC',CAST('12/19/2019' AS DATE),CAST('6/3/2020' AS DATE),211.66,CAST('4/2/2021' AS DATE)),
('INTE0014 - INTERMOUNTAIN FARMERS ASSN',CAST('12/20/2019' AS DATE),CAST('6/3/2020' AS DATE),87.46,CAST('4/2/2021' AS DATE)),
('GARD0095 - GARD N WISE SALT LAKE',CAST('12/20/2019' AS DATE),CAST('6/3/2020' AS DATE),71.63,CAST('4/2/2021' AS DATE)),
('GRIF0002 - GRIFFIN GREENHOUSE - SCHENECTA',CAST('12/26/2019' AS DATE),CAST('6/3/2020' AS DATE),1849.79,CAST('4/2/2021' AS DATE)),
('COST0007 - COSTA COLOR-MIAMI FL',CAST('1/8/2020' AS DATE),CAST('6/3/2020' AS DATE),15629.4,CAST('4/2/2021' AS DATE)),
('COST0015 - COSTA FARMS-FOLIAGE DIV (CNF)',CAST('1/9/2020' AS DATE),CAST('6/3/2020' AS DATE),6652.8,CAST('4/2/2021' AS DATE)),
('COST0015 - COSTA FARMS-FOLIAGE DIV (CNF)',CAST('1/10/2020' AS DATE),CAST('6/3/2020' AS DATE),944,CAST('4/2/2021' AS DATE)),
('FOST0001 - FOSTERS INC RETAIL',CAST('1/13/2020' AS DATE),CAST('6/3/2020' AS DATE),888.04,CAST('4/2/2021' AS DATE)),
('INTE0003 - GREENHOUSE MEGASTORE',CAST('1/13/2020' AS DATE),CAST('6/3/2020' AS DATE),368.52,CAST('4/2/2021' AS DATE)),
('JOSE0009 - JOSEPH GEREMIA FARM',CAST('1/13/2020' AS DATE),CAST('6/3/2020' AS DATE),1739.3,CAST('4/2/2021' AS DATE)),
('COST0015 - COSTA FARMS-FOLIAGE DIV (CNF)',CAST('1/14/2020' AS DATE),CAST('6/3/2020' AS DATE),5026.94,CAST('4/2/2021' AS DATE)),
('RITC0001 - RITCHIE FEED SEED C',CAST('1/15/2020' AS DATE),CAST('6/3/2020' AS DATE),1.1,CAST('4/2/2021' AS DATE)),
('KUBE0001 - KUBE PAK CORPORATION',CAST('1/16/2020' AS DATE),CAST('6/3/2020' AS DATE),874.5,CAST('4/2/2021' AS DATE)),
('FRYS0001 - FRYSVILLE FARMS (MILES FRY)',CAST('1/17/2020' AS DATE),CAST('6/3/2020' AS DATE),1857.6,CAST('4/2/2021' AS DATE)),
('PRIN0001 - PRINCE CORPORATION',CAST('1/20/2020' AS DATE),CAST('6/3/2020' AS DATE),211.16,CAST('4/2/2021' AS DATE)),
('GALE0006 - GALES GARDEN CENTER',CAST('1/20/2020' AS DATE),CAST('6/3/2020' AS DATE),19.47,CAST('4/2/2021' AS DATE)),
('CKGR0004 - CK GREENHOUSES',CAST('1/20/2020' AS DATE),CAST('6/3/2020' AS DATE),4442.04,CAST('4/2/2021' AS DATE)),
('MATS0002 - MATSUDAS OF SACRAMENTO',CAST('1/20/2020' AS DATE),CAST('6/3/2020' AS DATE),57056.64,CAST('5/2/2021' AS DATE)),
('GRIF0005 - GRIFFIN GREENHOUSE - AUBURN',CAST('1/21/2020' AS DATE),CAST('6/3/2020' AS DATE),7399.49,CAST('5/2/2021' AS DATE)),
('GRIF0014 - GRIFFIN GREENHOUSE - MORGANTWN',CAST('1/21/2020' AS DATE),CAST('6/3/2020' AS DATE),16031.53,CAST('5/2/2021' AS DATE)),
('GRIF0004 - GRIFFIN GREENHOUSE - CHESHIRE',CAST('1/21/2020' AS DATE),CAST('6/3/2020' AS DATE),6166.24,CAST('5/2/2021' AS DATE)),
('GROW0001 - GROWER DIRECT FARMS INC',CAST('1/24/2020' AS DATE),CAST('6/3/2020' AS DATE),1199.44,CAST('5/2/2021' AS DATE)),
('CHAR0009 - CHARLES SPITZNER',CAST('1/24/2020' AS DATE),CAST('6/3/2020' AS DATE),7350,CAST('5/2/2021' AS DATE)),
('KURT0018 - KURTZ FARMS',CAST('1/27/2020' AS DATE),CAST('6/3/2020' AS DATE),3689.69,CAST('5/2/2021' AS DATE)),
('PARK0004 - PARKS BROTHERS FARMS',CAST('1/27/2020' AS DATE),CAST('6/3/2020' AS DATE),2250,CAST('5/2/2021' AS DATE)),
('JAYW0001 - JAY W GUILD',CAST('1/28/2020' AS DATE),CAST('6/3/2020' AS DATE),8388.9,CAST('5/2/2021' AS DATE)),
('VAND0001 - VANDENBERG BULB CO INC',CAST('1/29/2020' AS DATE),CAST('6/3/2020' AS DATE),70.35,CAST('5/2/2021' AS DATE)),
('LITT0001 - LITTLE MOUNTAIN GREENHOUSES U',CAST('2/3/2020' AS DATE),CAST('6/3/2020' AS DATE),61.92,CAST('5/2/2021' AS DATE)),
('JIFF0006 - JIFFY PRODUCTS OF AMERICA',CAST('2/4/2020' AS DATE),CAST('6/3/2020' AS DATE),16652.25,CAST('5/2/2021' AS DATE)),
('RSGR0004 - RS GROWERS SUPPLY INC',CAST('2/6/2020' AS DATE),CAST('6/3/2020' AS DATE),0.02,CAST('5/2/2021' AS DATE)),
('SCHL0001 - SCHLEGEL GRHSE',CAST('2/6/2020' AS DATE),CAST('6/3/2020' AS DATE),3646.58,CAST('5/2/2021' AS DATE)),
('VANW0013 - VAN WINGERDEN GREENHOUSE LLC',CAST('2/7/2020' AS DATE),CAST('6/3/2020' AS DATE),537.3,CAST('5/2/2021' AS DATE)),
('RITC0001 - RITCHIE FEED SEED C',CAST('2/7/2020' AS DATE),CAST('6/3/2020' AS DATE),179.46,CAST('5/2/2021' AS DATE)),
('LONG0002 - LONGFELLOWS GREENHOUSE',CAST('2/7/2020' AS DATE),CAST('6/3/2020' AS DATE),5536.48,CAST('5/2/2021' AS DATE)),
('AAPL0001 - AA PLANTS INC',CAST('2/7/2020' AS DATE),CAST('6/3/2020' AS DATE),3843,CAST('5/2/2021' AS DATE)),
('BFGS0004 - BFG SUPPLY - GRAND RAPIDS(W04)',CAST('2/10/2020' AS DATE),CAST('6/3/2020' AS DATE),553.3,CAST('5/2/2021' AS DATE)),
('KALA0002 - KALAMAZOO FLOWER GROUP LLC',CAST('2/10/2020' AS DATE),CAST('6/3/2020' AS DATE),502.7,CAST('5/2/2021' AS DATE)),
('DOIT0079 - DO IT BEST CORP',CAST('2/10/2020' AS DATE),CAST('6/3/2020' AS DATE),494.4,CAST('5/2/2021' AS DATE)),
('DOIT0004 - DO IT BEST CORP',CAST('2/11/2020' AS DATE),CAST('6/3/2020' AS DATE),82.4,CAST('5/2/2021' AS DATE)),
('GRIF0002 - GRIFFIN GREENHOUSE - SCHENECTA',CAST('2/12/2020' AS DATE),CAST('6/3/2020' AS DATE),376.6,CAST('5/2/2021' AS DATE)),
('NATU0027 - NATURALLY BEAUTIFUL PLANT PROD',CAST('2/12/2020' AS DATE),CAST('6/3/2020' AS DATE),31636.8,CAST('5/2/2021' AS DATE)),
('FARM0012 - FARMETTE GARDENS',CAST('2/13/2020' AS DATE),CAST('6/3/2020' AS DATE),6028.37,CAST('5/2/2021' AS DATE)),
('SPOR0002 - SPORTEL GREENHOUSE',CAST('2/13/2020' AS DATE),CAST('6/3/2020' AS DATE),3728.54,CAST('5/2/2021' AS DATE)),
('ARET0001 - ARETT SALES - BRISTOL',CAST('2/14/2020' AS DATE),CAST('6/3/2020' AS DATE),266.62,CAST('5/2/2021' AS DATE)),
('GREE0005 - GREEN ISLAND DISTRIBUTORS INC.',CAST('2/14/2020' AS DATE),CAST('6/3/2020' AS DATE),21.21,CAST('5/2/2021' AS DATE)),
('FARM0001 - FARMERS COOPERATIVE ELEVATOR',CAST('2/17/2020' AS DATE),CAST('6/3/2020' AS DATE),495,CAST('5/2/2021' AS DATE)),
('VANW0009 - VAN WINGERDEN INTERNATIONAL',CAST('2/17/2020' AS DATE),CAST('6/3/2020' AS DATE),908.6,CAST('5/2/2021' AS DATE)),
('CIVA0001 - CIVANO NURSERY',CAST('2/18/2020' AS DATE),CAST('6/3/2020' AS DATE),50700,CAST('5/2/2021' AS DATE))
) x(ship_cust_descr,order_date,ship_date,sales,revised)
)
,upd AS (
UPDATE
rlarp.osm_pool p
SET
ship_date = revised
FROM
move
WHERE
move.ship_cust_descr = p.ship_cust_descr
AND move.order_date = p.order_date
AND move.ship_date = p.ship_date
AND p.ship_season = 2021
RETURNING *
)
SELECT ship_month ,sum(value_usd) FROM upd group by ship_month;
UPDATE
rlarp.osm_pool
SET
ship_month = gld.sspr || ' - ' || to_char(ship_date,'FMMon')
,ship_season = gld.ssyr
,fspr = gld.fspr
FROM
rlarp.gld gld
WHERE
ship_date BETWEEN gld.sdat AND gld.edat
RETURNING *;
--ROLLBACK;
--SELECT
-- move.revised
-- ,sum(sales)
-- ,sum(value_usd)
--FROM
-- rlarp.osm_pool p
-- INNER JOIN move ON
-- move.ship_cust_descr = p.ship_cust_descr
-- AND move.order_date = p.order_date
-- AND move.ship_date = p.ship_date
--WHERE
-- ship_season = 2021
--GROUP BY
-- move.revised