(Bu sağlanan sınırlı bilgilere dayalı olarak, tüm temel önerilerdir.)
MySQL içinde muhtemelen (Tutorial on "GROUP BY") aşağıdaki gibi bir şey kullanarak GROUP BY deyimi kullanılarak bakıyor olurdu:
SELECT
( SUM( UNIX_TIMESTAMP( `workEnd` )
- UNIX_TIMESTAMP( `workStart` )
) / 3600 ) AS `hoursWorked` ,
DATE_FORMAT( `workStart` , "%Y-%m" ) AS `yearAndMonth`
FROM
`yourTableName`
WHERE
`employeeName`="John"
GROUP BY
`yearAndMonth`
ORDER BY
`yearAndMonth` DESC
Bu biraz aşağıdaki gibi verileri döndürür:
hoursWorked | yearAndMonth
--------------------------
22.0000 | 2010-02
15.2500 | 2010-01
Bu verilerden, daha sonra Google Charts gibi (Charts API) bir grafik formunda bu bilgileri temsil etmek, bir grafik paketi doldurabilirsiniz.
(I am aware that this is not an exhaustive answer, but the hopes are to give you a few pointers on where to start looking, so you can start finding your own solution and then return to StackOverflow with more specific questions when parts of your solution are difficult.)