Permalink
Browse files

Fix to pydio/internal-tracker#126 - fixing group by in only_full_grou…

…p_by mode
  • Loading branch information...
1 parent f0a3963 commit 83bf7bdc6f7af00313b2e8899764a688883cd88e @ghecquet ghecquet committed Sep 26, 2016
Showing with 6 additions and 6 deletions.
  1. +6 −6 core/src/plugins/log.sql/queries.json
@@ -52,7 +52,7 @@
"order":"Date_sortable"
},
"DIAGRAM":"bar",
- "SQL":"SELECT DATE( logdate )AS Date, COUNT( DISTINCT ajxp_log.user ) AS Connections FROM ajxp_log WHERE ajxp_log.user IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE severity = \"INFO\" AND login NOT IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE repo_uuid = \"ajxp.parent_user\" ) ) AND AJXP_CURSOR_DATE GROUP BY DATE( logdate ) ORDER BY logdate DESC "
+ "SQL":"SELECT DATE( logdate )AS Date, COUNT( DISTINCT ajxp_log.user ) AS Connections FROM ajxp_log WHERE ajxp_log.user IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE severity = \"INFO\" AND login NOT IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE repo_uuid = \"ajxp.parent_user\" ) ) AND AJXP_CURSOR_DATE GROUP BY DATE( logdate ) ORDER BY DATE(logdate) DESC "
},
{
"NAME":"connections_per_day",
@@ -63,7 +63,7 @@
"order":"Date_sortable"
},
"DIAGRAM":"bar",
- "SQL":"SELECT DATE( logdate )AS Date, COUNT( DISTINCT id ) AS Connections FROM ajxp_log WHERE ajxp_log.user IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE severity = \"INFO\" AND login NOT IN (SELECT DISTINCT login FROM ajxp_user_rights WHERE repo_uuid = \"ajxp.parent_user\" ) ) AND AJXP_CURSOR_DATE AND (params LIKE \"Log In%\" OR message LIKE \"Log In%\" ) AND ( params LIKE \"%WebUI%\" ) GROUP BY DATE( logdate ) ORDER BY logdate DESC"
+ "SQL":"SELECT DATE( logdate )AS Date, COUNT( DISTINCT id ) AS Connections FROM ajxp_log WHERE ajxp_log.user IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE severity = \"INFO\" AND login NOT IN (SELECT DISTINCT login FROM ajxp_user_rights WHERE repo_uuid = \"ajxp.parent_user\" ) ) AND AJXP_CURSOR_DATE AND (params LIKE \"Log In%\" OR message LIKE \"Log In%\" ) AND ( params LIKE \"%WebUI%\" ) GROUP BY DATE( logdate ) ORDER BY DATE(logdate) DESC"
},
{
"SEPARATOR":true,
@@ -78,7 +78,7 @@
"order":"Date_sortable"
},
"DIAGRAM":"bar",
- "SQL":"SELECT DATE(logdate) AS Date, COUNT(distinct id) AS Downloads FROM ajxp_log WHERE severity = \"INFO\" AND (params like \"Download%\" OR message like \"Download%\" ) AND AJXP_CURSOR_DATE GROUP BY DATE(logdate) ORDER BY logdate DESC"
+ "SQL":"SELECT DATE(logdate) AS Date, COUNT(distinct id) AS Downloads FROM ajxp_log WHERE severity = \"INFO\" AND (params like \"Download%\" OR message like \"Download%\" ) AND AJXP_CURSOR_DATE GROUP BY DATE(logdate) ORDER BY DATE(logdate) DESC"
},
{
"NAME":"uploads_per_day",
@@ -89,7 +89,7 @@
"order":"Date_sortable"
},
"DIAGRAM":"bar",
- "SQL":"SELECT DATE(logdate) AS Date, COUNT(distinct id) AS Uploads FROM ajxp_log WHERE severity = \"INFO\" AND (message like \"Upload%\" OR message like \"Upload%\") AND AJXP_CURSOR_DATE GROUP BY DATE(logdate) ORDER BY logdate DESC"
+ "SQL":"SELECT DATE(logdate) AS Date, COUNT(distinct id) AS Uploads FROM ajxp_log WHERE severity = \"INFO\" AND (message like \"Upload%\" OR message like \"Upload%\") AND AJXP_CURSOR_DATE GROUP BY DATE(logdate) ORDER BY DATE(logdate) DESC"
},
{
"NAME":"sharedfiles_per_day",
@@ -100,7 +100,7 @@
"order":"Date_sortable"
},
"DIAGRAM":"bar",
- "SQL":"SELECT DATE( logdate )AS Date, COUNT( DISTINCT id ) AS Shares FROM ajxp_log WHERE severity = \"INFO\" AND AJXP_CURSOR_DATE AND ajxp_log.user IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE login NOT IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE repo_uuid = \"ajxp.parent_user\" ) ) AND (params LIKE \"New Share%\" OR message LIKE \"New Share%\" ) GROUP BY DATE( logdate ) ORDER BY logdate DESC"
+ "SQL":"SELECT DATE( logdate )AS Date, COUNT( DISTINCT id ) AS Shares FROM ajxp_log WHERE severity = \"INFO\" AND AJXP_CURSOR_DATE AND ajxp_log.user IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE login NOT IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE repo_uuid = \"ajxp.parent_user\" ) ) AND (params LIKE \"New Share%\" OR message LIKE \"New Share%\" ) GROUP BY DATE( logdate ) ORDER BY DATE(logdate) DESC"
},
{
"NAME":"most_downloaded",
@@ -112,4 +112,4 @@
"DIAGRAM": "pie",
"SQL":"SELECT SUBSTR(params,7) AS File, COUNT( 1 ) AS Downloaded FROM ajxp_log WHERE severity = \"INFO\" AND (params LIKE \"Download%\" OR message LIKE \"Download%\" ) AND AJXP_CURSOR_DATE GROUP BY params ORDER BY COUNT( 1 ) DESC LIMIT 20"
}
-]
+]

0 comments on commit 83bf7bd

Please sign in to comment.