Ver originalSELECT DATE_FORMAT(an1.fecha,"%d-%M") AS dia_mes, AVG(an1.temp) AS TEMP2010, AVG(an1.temp) AS TEMP2011FROM (SELECT * FROM tabla WHERE YEAR(fecha) = '2010') an1CROSS JOIN (SELECT * FROM tabla WHERE YEAR(fecha) = '2011') an2WHERE DATE_FORMAT(an1.fecha,"%d-%m") = DATE_FORMAT(an2.fecha,"%d-%m")GROUP BY dia_mesORDER BY dia_mes ASC