Last active
August 29, 2015 14:11
Revisions
-
joelbrewer revised this gist
Dec 10, 2014 . 2 changed files with 12 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ select DATE_FORMAT(created_on, '%m-%d-%Y') as date, order_item_sku, SUM(product_item_price) FROM j25_virtuemart_order_items as v LEFT JOIN ( select (select @n= @n - interval 1 day) n from j25_content limit 30 ) AS d ON DATE_FORMAT(v.created_on, '%Y-%m-%d') = d.n WHERE v.created_on between FROM_UNIXTIME(1415577600) AND NOW() GROUP BY v.created_on, v.order_item_sku This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +0,0 @@ -
joelbrewer revised this gist
Dec 10, 2014 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,4 @@ select created_on, order_item_sku, SUM(product_item_price) FROM j25_virtuemart_order_items WHERE created_on between FROM_UNIXTIME(1415577600) AND NOW() GROUP BY created_on, order_item_sku -
joelbrewer revised this gist
Dec 10, 2014 . 4 changed files with 40 additions and 33 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ SKU | FINAL_PRICE | CREATED_ON | ----------|-------------|---------------------| SKU_1 | 700.00 | 2009-07-20 12:07:31 | SKU_3 | 200.00 | 2009-07-22 12:07:31 | SKU_7 | 700.00 | 2009-07-25 12:07:31 | SKU_10 | 900.00 | 2009-07-30 12:07:31 | SKU_11100 | 10.00 | 2009-07-31 12:07:31 | This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ DATE | SKU_1 | SKU_3 | SKU_4 | SKU_9 | ----------|-------|-------|-------|-------| 1-01-2014 | 500.00| 400.00| 500.00| 700.00| 1-02-2014 | 20.00| 0.00 | 500.00| 800.00| 1-03-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-04-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-05-2014 | 500.00| 400.00| 500.00| 700.00| 1-06-2014 | 20.00| 0.00 | 500.00| 800.00| 1-07-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-08-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-09-2014 | 500.00| 400.00| 500.00| 700.00| 1-10-2014 | 20.00| 0.00 | 500.00| 800.00| 1-11-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-12-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-13-2014 | 500.00| 400.00| 500.00| 700.00| 1-14-2014 | 20.00| 0.00 | 500.00| 800.00| 1-15-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-16-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-17-2014 | 500.00| 400.00| 500.00| 700.00| 1-18-2014 | 20.00| 0.00 | 500.00| 800.00| 1-19-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-20-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-21-2014 | 500.00| 400.00| 500.00| 700.00| 1-22-2014 | 20.00| 0.00 | 500.00| 800.00| 1-23-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-24-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-25-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-26-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-27-2014 | 500.00| 400.00| 500.00| 700.00| 1-28-2014 | 20.00| 0.00 | 500.00| 800.00| 1-29-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-30-2014 | 10.00 | 100.00| 500.00| 10.00 | This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,32 +1 @@ select date_sub(date(now()), interval id day) as date, sum(product_final_price) from j25_content, j25_virtuemart_order_items GROUP BY date; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@ -
joelbrewer revised this gist
Dec 10, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ select date_sub(date(now()), interval id day) as date, sum(product_final_price) from j25_content, j25_virtuemart_order_items GROUP BY date; -
joelbrewer created this gist
Dec 10, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ DATE | SKU_1 | SKU_3 | SKU_4 | SKU_9 | ----------|-------|-------|-------|-------| 1-01-2014 | 500.00| 400.00| 500.00| 700.00| 1-02-2014 | 20.00| 0.00 | 500.00| 800.00| 1-03-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-04-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-05-2014 | 500.00| 400.00| 500.00| 700.00| 1-06-2014 | 20.00| 0.00 | 500.00| 800.00| 1-07-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-08-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-09-2014 | 500.00| 400.00| 500.00| 700.00| 1-10-2014 | 20.00| 0.00 | 500.00| 800.00| 1-11-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-12-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-13-2014 | 500.00| 400.00| 500.00| 700.00| 1-14-2014 | 20.00| 0.00 | 500.00| 800.00| 1-15-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-16-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-17-2014 | 500.00| 400.00| 500.00| 700.00| 1-18-2014 | 20.00| 0.00 | 500.00| 800.00| 1-19-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-20-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-21-2014 | 500.00| 400.00| 500.00| 700.00| 1-22-2014 | 20.00| 0.00 | 500.00| 800.00| 1-23-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-24-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-25-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-26-2014 | 10.00 | 100.00| 500.00| 10.00 | 1-27-2014 | 500.00| 400.00| 500.00| 700.00| 1-28-2014 | 20.00| 0.00 | 500.00| 800.00| 1-29-2014 | 0.00 | 20.00 | 500.00| 90.00 | 1-30-2014 | 10.00 | 100.00| 500.00| 10.00 |