![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
08/05/2008, 14:06
|
![Avatar de Beakdan](http://static.forosdelweb.com/customavatars/avatar14541_1.gif) | | | Fecha de Ingreso: diciembre-2001 Ubicación: Monterrey, Nuevo León
Mensajes: 433
Antigüedad: 23 años, 1 mes Puntos: 7 | |
Re: Operaciones Matematicas
Código:
SELECT Codigo,
AVG(SUMA) AS PROMEDIO
FROM (
Select Mes, Codigo, SUM(Venta) AS SUMA
From Tabla1
GROUP BY Codigo, Mes
) as TSUM
GROUP BY Codigo |