mysql求日平均值的語(yǔ)句怎么寫?
select left(`時(shí)間`,10),`類型`,avg(`排名`) from tablename group by left(`時(shí)間`,10),`類型` order by left(`時(shí)間`,10),`類型` select DATE_FORMAT(`時(shí)間`,%Y-%m-%d) ,`類型`,avg(`排名`) from tablename group by DATE_FORMAT(`時(shí)間`,%Y-%m-%d) ,`類型` order by DATE_FORMAT(`時(shí)間`,%Y-%m-%d) ,`類型`