Advertisement
juliarnasution

mysql sum

Feb 5th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.58 KB | None | 0 0
  1. SELECT
  2.     `order_descriptions`.`tanggal_order`, `order_descriptions`.`quantity`, `products`.`name`, `products`.`price`, `units`.`satuan`, `units`.`pangkat`
  3.     , order_descriptions.quantity*products.price AS harga
  4.         FROM `orders`
  5.             inner join `order_descriptions` on `orders`.`id` = `order_descriptions`.`order_id`
  6.                 inner join `products` on `products`.`id` = `orders`.`product_id`
  7.                     inner join `units` on `units`.`id` = `products`.`unit`
  8.                         WHERE `orders`.`invoice_id` = '4'
  9.                             ORDER BY `orders`.`id` DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement