Hi, I making a temperature app
and want to get the avearge temperature a day over several years.
Anyone knows the SQL code to do this ?
Average of day over several years
Re: Average of day over several years
Nice project, may I suggest alo add the max and minimum.
The folowing code should be a good start:
The folowing code should be a good start:
Code: Select all
SELECT MONTH(datum),DAY(datum),min(temperature),max(temperature),avg(temperature) FROM temperature GROUP BY MONTH(datum),DAY(datum)