Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/10/2008, 04:08
bellleti
 
Fecha de Ingreso: abril-2008
Mensajes: 144
Antigüedad: 16 años
Puntos: 1
Pregunta como hacer estadisticas con datos mysql?

tengo la siguiente consulta y tengo que hacer medianas de todas las tablas que me devuelve "milK" "scc" "fat" etcc....

Código PHP:

$sql 
"SELECT p.testdim,, p.milk, p.fat,p.scc,p.prot,p.herd_id, h.herd_id,h.codi,a.herd_id,a.parity,a.endparitydate
                   FROM production p , herd h, ag_parity a
                  WHERE and p.herd_id= a.herd_id 
                 and a.herd_id= h.herd_id
                 and p.herd_id= h.herd_id
                 group by p.testdate     
                 LIMIT 0, 50"

como lo harian? sabeis alguna forma facil de hacerlo?¿ voy un poco perdido

graciasv :P