Skip to content

Instantly share code, notes, and snippets.

@joelbrewer
Last active August 29, 2015 14:11
Show Gist options
  • Save joelbrewer/19fc40e33dc980425ba5 to your computer and use it in GitHub Desktop.
Save joelbrewer/19fc40e33dc980425ba5 to your computer and use it in GitHub Desktop.
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 |
select date_sub(date(now()), interval id day) as date, sum(product_final_price) from j25_content, j25_virtuemart_order_items GROUP BY date;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment