Lowercase join addresses in the pie

This commit is contained in:
Risto Lahtela 2021-03-17 16:15:00 +02:00
parent 36bb989d7c
commit ff679d626d

View File

@ -197,7 +197,7 @@ public class UserInfoQueries {
public static Query<Map<String, Integer>> joinAddresses() {
String sql = SELECT +
"COUNT(1) as total," +
"COALESCE(" + UserInfoTable.JOIN_ADDRESS + ", ?) as address" +
"LOWER(COALESCE(" + UserInfoTable.JOIN_ADDRESS + ", ?)) as address" +
FROM + '(' +
SELECT + DISTINCT +
UserInfoTable.USER_UUID + ',' +
@ -227,7 +227,7 @@ public class UserInfoQueries {
public static Query<Map<String, Integer>> joinAddresses(ServerUUID serverUUID) {
String sql = SELECT +
"COUNT(1) as total," +
"COALESCE(" + UserInfoTable.JOIN_ADDRESS + ", ?) as address" +
"LOWER(COALESCE(" + UserInfoTable.JOIN_ADDRESS + ", ?)) as address" +
FROM + UserInfoTable.TABLE_NAME +
WHERE + UserInfoTable.SERVER_UUID + "=?" +
GROUP_BY + "address" +