From d422305b5dbb07ef1dd199fbdf0d197e0ad5c891 Mon Sep 17 00:00:00 2001 From: Trowbridge Date: Wed, 27 Feb 2019 13:25:57 -0500 Subject: [PATCH] add some sql and get rid of node mudule file --- .gitignore | 3 ++- SQL/blend.sql | 32 ++++++++++++++++++++++++++++++++ SQL/list_months.sql | 15 +++++++++++++++ node_modules/.bin/mime | 1 - 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 SQL/blend.sql create mode 100644 SQL/list_months.sql delete mode 120000 node_modules/.bin/mime diff --git a/.gitignore b/.gitignore index 2b7af74..87b7008 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ npm-debug.log *.swp /node_modules -.env \ No newline at end of file +.env +/.vscode \ No newline at end of file diff --git a/SQL/blend.sql b/SQL/blend.sql new file mode 100644 index 0000000..a8a95eb --- /dev/null +++ b/SQL/blend.sql @@ -0,0 +1,32 @@ +SELECT + version + ,bill_cust + ,ship_cust + ,part + ,promo + ,terms + ,plnt + ,r_currency + ,c_currency + ,requestdate - orderdate rdiff + ,shipdate - requestdate sdiff + ,sum(fb_qty) fb_qty + ,sum(fb_val_loc) fb_val_loc + ,sum(fb_cst_loc) fb_cst_loc +FROM + rlarp.osm +WHERE + + AND calc_status <> 'CANCELED' +GROUP BY + version + ,bill_cust + ,ship_cust + ,part + ,promo + ,terms + ,plnt + ,r_currency + ,c_currency + ,requestdate - orderdate + ,shipdate - requestdate diff --git a/SQL/list_months.sql b/SQL/list_months.sql new file mode 100644 index 0000000..daa3737 --- /dev/null +++ b/SQL/list_months.sql @@ -0,0 +1,15 @@ + +SELECT + oseas + ,extract('month' from odate) month + ,sum(fb_qty) fb_qty + ,sum(fb_val_loc) fb_val_loc + ,sum(fb_cst_loc) fb_cst_loc +FROM + rlarp.osm_ppfa_varto_mv +WHERE + + AND calc_status <> 'CANCELED' +GROUP BY + oseas + ,extract('month' from odate) \ No newline at end of file diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime deleted file mode 120000 index fbb7ee0..0000000 --- a/node_modules/.bin/mime +++ /dev/null @@ -1 +0,0 @@ -../mime/cli.js \ No newline at end of file