Sql统计:
- 按月统计下载数: select jack.month, count(*) as count from (select DATE_FORMAT(time,'%Y-%m') as month from download_info) jack group by month desc
Nginx配置goaccess 统计:
nginx配置goaccess 生成可视化统计: LANG="zh_CN.UTF-8" goaccess -a -d -f /var/log/nginx/access.log -p /etc/goaccess/goaccess.conf -o /usr/local/result.html
#================== 月 '%Y-%m' ================================ #1.近一年月份故障数展示 select t.time as timer, count(1) as count from (select DATE_FORMAT(occur_time,'%Y-%m') as time from exception where instrument_id = 1001 and inst_error_flag = 1 and occur_time >= '2019-03-