Created
November 5, 2015 02:25
-
-
Save oliverlundquist/c64dc327c4a55e16bad3 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 | |
CAST(SUM(`o_p`.`cost` * `o_p`.`count`) as UNSIGNED) as `cost`, | |
CAST(SUM(`o_t`.`subtotal`) as UNSIGNED) as `subtotal`, | |
CAST(SUM(`o_t`.`shipping_fee`) as UNSIGNED) as `shipping_fee`, | |
CAST(SUM(`o_t`.`payment_fee`) as UNSIGNED) as `payment_fee`, | |
CAST(SUM(`o_t`.`wrapping_total`) as UNSIGNED) as `wrapping_total`, | |
CAST(SUM(`o_t`.`points_discount`) as UNSIGNED) as `points_discount`, | |
CAST(SUM(`o_t`.`total`) as UNSIGNED) as `total` | |
from | |
order_products as o_p, | |
order_totals as o_t | |
where | |
o_p.order_id AND o_t.order_id | |
IN (186840,186841,186842,186843,186844) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment