requete vol par avion par mois
Date: dimanche 31 mars 2013 21:50:22
bonjour
cette requete ne fonctionne ^plus :
SELECT
name AS Callsign,
YEAR( start_date ) AS Year,
CONCAT(FLOOR(SUM( duration )/600),':',TIME_FORMAT(SEC_TO_TIME((SUM( duration )/600 - FLOOR(SUM( duration )/600))*3600),'%i')) AS Total
FROM flight
LEFT JOIN resource ON resource.id = flight.aircraft_id
WHERE YEAR(start_date) = $year
GROUP BY name
UNION
SELECT
"Total",
$year AS year,
CONCAT(FLOOR(SUM( duration )/600),':',TIME_FORMAT(SEC_TO_TIME((SUM( duration )/600 - FLOOR(SUM( duration )/600))*3600),'%i')) AS Total
FROM flight
WHERE YEAR(start_date) = $year
GROUP BY year
merci de votre aide
Olivier BAR
TOURSAEROCLUB