skip to Main Content

Phpmyadmin – why multiply two column in sql is not equals to sum(column1 * column2)

if have these tables : orders(amount,unit_price,child_amount,child_price,service_id,issue_date,is_success) pools(name,for_view) services(id,pool_id) when i run this sql : SELECT SUM(orders.amount) AS totalAmount, SUM(orders.unit_price) AS totalPrice, SUM(orders.amount*orders.unit_price) AS total, SUM(orders.child_amount) AS totalAmountC, SUM(orders.child_price) AS totalPriceC, SUM(orders.child_amount*orders.child_price) AS totalC, pools.name, pools.for_view FROM orders INNER JOIN services…

VIEW QUESTION
Back To Top
Search