Ok, so this for example is one of the queries used for the monthly report to get the data from the database:
$result = mysqli_query($con,"
SELECT avg(T), avg(Tmin), avg(Tmax), avg(H), avg(P), avg(D), avg(W), avg(G), avg(A), avg(S), max(T), max(Tmin), max(Tmax), max(H), max(P), max(D), max(W), max(G), max(A), max(S), min(T), min(Tmin), min(Tmax), min(H), min(P), min(D), min(W), min(G), min(A), min(S), stddev(T), stddev(Tmin), stddev(Tmax), stddev(H), stddev(P), stddev(D), stddev(W), stddev(G), stddev(A), stddev(S), max(RR)
FROM alldata
WHERE $span
GROUP BY YEAR(DateTime), MONTH(DateTime)
"
);
But it wont be much of use to you, because this always depends on how exactly you structure your tables and database.
It then all gets more complicated once you start using Ajax so that the page does not have to be refreshed to load new data.