how do i get the sum of the 4th column
- by every_answer_gets_a_point
this statement will generate a 4 column table:
SELECT shipped.badguy AS badguy, shipped.sdate AS LineDate,
'Delivery' AS Legend, -price*quantity AS amount
FROM product JOIN shipped ON (product.id = shipped.product)
UNION
SELECT receipt.badguy, receipt.rdate,notes, amount
FROM
how do i get the total sum of the 4th of column of what the above generates?