pm2.5检测统计
SELECT AVG(pm25_h),AVG(pm10_h),AVG(temp_h),AVG(humi_h),AVG(co2_h),AVG(tvoc_h),perf_time FROM( SELECT pm25_h,pm10_h,temp_h,humi_h,co2_h,tvoc_h,perf_time FROM perf_environ WHERE TO_DAYS(perf_time) = TO_DAYS(DATE_SUB('2016-12-23 15:05:00',INTERVAL 1 DAY)) ) AS perfEnviron GROUP BY SUBSTR(perf_time,1,13) ORDER BY perf_time DESC;