{"action":"opened","issue":{"url":"https://api.github.com/repos/sipcapture/homer-api/issues/63","labels_url":"https://api.github.com/repos/sipcapture/homer-api/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/sipcapture/homer-api/issues/63/comments","events_url":"https://api.github.com/repos/sipcapture/homer-api/issues/63/events","html_url":"https://github.com/sipcapture/homer-api/issues/63","id":122250020,"number":63,"title":"useragent statistics groupings are incompatible with MySQL 5.7 default sql_mode (ONLY_FULL_GROUP_BY)","user":{"login":"giangi","id":1782060,"avatar_url":"https://avatars.githubusercontent.com/u/1782060?v=3","gravatar_id":"","url":"https://api.github.com/users/giangi","html_url":"https://github.com/giangi","followers_url":"https://api.github.com/users/giangi/followers","following_url":"https://api.github.com/users/giangi/following{/other_user}","gists_url":"https://api.github.com/users/giangi/gists{/gist_id}","starred_url":"https://api.github.com/users/giangi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giangi/subscriptions","organizations_url":"https://api.github.com/users/giangi/orgs","repos_url":"https://api.github.com/users/giangi/repos","events_url":"https://api.github.com/users/giangi/events{/privacy}","received_events_url":"https://api.github.com/users/giangi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-15T11:18:28Z","updated_at":"2015-12-15T11:18:28Z","closed_at":null,"body":"Hello,\r\n\r\nI just noticed, by checking why useragent statistics did not seem to be displayed, that current APIs for usergent statistics use a query not compatible with recent changes in MySQL's default sql_mode (see https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html, https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes). Specifically, I have (from `ngrep`)\r\n\r\n```\r\nT 2015/12/15 12:01:05.268456 127.0.0.1:50464 -> 127.0.0.1:3306 [AP] 5....SELECT id, UNIX_TIMESTAMP(`from_date`) as from_ts, UNIX_TIMESTAMP(`to_date`) as to_ts, useragent, method, COUNT(id) as cnt, SUM(total) as total FROM stats_useragent WHERE (`to_date` BETWEEN FROM_UNIXTIME(1450088318) AND FROM_UNIXTIME(1450174718)) AND ((method = 'INVITE')) GROUP BY useragent order by id DESC\r\n\r\nT 2015/12/15 12:01:05.268805 127.0.0.1:3306 -> 127.0.0.1:50464 [AP] �...�..#42000Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'homer_statistic.stats_useragent.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by\r\n```\r\n\r\nIt may be nice to see if at least the suggested configuration for MySQL can include a proper `sql-mode` override (removing `ONLY_FULL_GROUP_BY`, or if future API changes can take into account these \"strict\" modes."}}