SELECT SUM() FROM...
Posted: Tue 18 Nov 2008 23:16
I'm using the next
SELECT *,(SELECT SUM(nprod) FROM vtagar WHERE vtagar.num_vta = ventas.num_vta) as SUMG,
(SELECT SUM(nprod) FROM vtabot WHERE vtabot.num_vta = ventas.num_vta) AS SUMB
FROM ventas
the answer en Mysql 5.0.18 there is not problem, but whe I using this quetion en delphi lite 10 for microsotf windows no function
Whats the problem with SUM
check:
select SUM(columna) from table
what 'up with the SUM
SELECT *,(SELECT SUM(nprod) FROM vtagar WHERE vtagar.num_vta = ventas.num_vta) as SUMG,
(SELECT SUM(nprod) FROM vtabot WHERE vtabot.num_vta = ventas.num_vta) AS SUMB
FROM ventas
the answer en Mysql 5.0.18 there is not problem, but whe I using this quetion en delphi lite 10 for microsotf windows no function
Whats the problem with SUM
check:
select SUM(columna) from table
what 'up with the SUM