how do i get the sum of the 4th column
Posted
by every_answer_gets_a_point
on Stack Overflow
See other posts from Stack Overflow
or by every_answer_gets_a_point
Published on 2010-03-16T21:40:12Z
Indexed on
2010/03/16
21:51 UTC
Read the original article
Hit count: 240
sql
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?
© Stack Overflow or respective owner