MySQL Issue ONLY_FULL_GROUP_BY - olszowka/Zambia GitHub Wiki

The MySQL db permits several deviations from ANSI standard SQL. One of these is much more relaxed constraints on the use of SELECT statements with a GROUP BY clause. Permitting the non-standard use is controlled by the server variable ONLY_FULL_GROUP_BY. Previously, this variable defaulted to FALSE, but starting with MySQL 5.7, it defaults to TRUE. It is theoretically possible to reconfigure the db server to FALSE, but some Zambia administrators may not have such access to their db servers. Therefore, we'd like to rewrite the Zambia queries to meet the tighter constraints of ONLY_FULL_GROUP_BY = TRUE. This rewrite is a work in progress. We will prioritize the queries in the main part of the code and then get to rewriting reports.