but it can't work if multiple tables.
how it can use for multiple tables?
- Original Message -
From: "ISC Edwin Cruz" <[EMAIL PROTECTED]>
To: "'The Nice Spider'" <[EMAIL PROTECTED]>;
Sent: Wednesday, November 23, 2005 7:13 AM
Subject:
you
Regards!
-Mensaje original-
De: The Nice Spider [mailto:[EMAIL PROTECTED]
Enviado el: Martes, 22 de Noviembre de 2005 05:27 p.m.
Para: mysql@lists.mysql.com
Asunto: How to SUM every row for SubTotal?
If I have table like:
CODE QTY
100 30
200 20
300 25
and I want a
If I have table like:
CODE QTY
100 30
200 20
300 25
and I want a result like:
CODE QTY SUBTOTAL
100 30 30
200 20 50 (this come from 30+20)
300 25 75 (this come from 50+25)
How to write query like that?
---