Created
February 5, 2013 17:48
-
-
Save shofetim/4716205 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 | |
| o.id AS "Order Number", | |
| o.order_date AS "Order Date", | |
| o.invoice_date AS "Invoice Date", | |
| o.cached_post_shipped_invoiced_total AS "Amount", | |
| CASE o.order_status | |
| WHEN 1 THEN 'In Cart' | |
| WHEN 2 THEN 'Resumed' | |
| WHEN 3 THEN 'Placed' | |
| WHEN 4 THEN 'Queued' | |
| WHEN 5 THEN 'Picking' | |
| WHEN 6 THEN 'Picked' | |
| WHEN 8 THEN 'Shipped' | |
| ELSE 'Unknown' | |
| END AS "Status" | |
| FROM customers_customer AS c | |
| LEFT OUTER JOIN orders_order AS o | |
| ON c.id = o.customer_id | |
| WHERE c.customer_number = 946040 | |
| LIMIT 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment