Created
July 1, 2009 21:08
-
-
Save rubysolo/139062 to your computer and use it in GitHub Desktop.
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 characters
| SELECT | |
| MONTH(order.date), | |
| SUM(CASE MONTH(order.date) WHEN 1 THEN detail.price * detail.quantity ELSE 0 END) AS JanuarySales, | |
| SUM(CASE MONTH(order.date) WHEN 2 THEN detail.price * detail.quantity ELSE 0 END) AS FebruarySales, | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment