|
@@ -96,7 +96,7 @@ class AlexaConnectNum(TemplateView):
|
|
|
#最近十二个月每月最高连接数
|
|
|
if operation == 'years':
|
|
|
cursor=connection.cursor()
|
|
|
- cursor.execute("SELECT FROM_UNIXTIME(data_time,'%Y-%m') as month, max(num) as max_num FROM alexa_statistics GROUP BY month order by month asc")
|
|
|
+ cursor.execute("SELECT FROM_UNIXTIME(data_time,'%Y-%m') as month, max(num) as max_num FROM alexa_statistics GROUP BY month order by month asc LIMIT 12")
|
|
|
res_query = cursor.fetchall()
|
|
|
for max_num, month in res_query:
|
|
|
res.append({'num':max_num, 'month':month})
|