Ver originalSELECT directorio.campo, gestion.origen, COUNT(1) AS cantidad, SUM(gestion.duracion) AS duracion FROM gestion INNER JOIN directorio ON gestion.campo=directorio.campoHERE date_format(fecha,'%Y-%m-%d') BETWEEN '2011-06-10' AND '2011-06-10' GROUP BY origen;