mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 23:50:58 +01:00
Count distinct messages
This commit is contained in:
@@ -49,7 +49,7 @@ public interface DaoMessage {
|
||||
@Query("SELECT message.*" +
|
||||
", account.name AS accountName, IFNULL(identity.color, account.color) AS accountColor, account.notify AS accountNotify" +
|
||||
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
||||
", COUNT(message.id) AS count" +
|
||||
", COUNT(DISTINCT message.msgid) AS count" +
|
||||
", " + unseen_unified + " AS unseen" +
|
||||
", " + unflagged_unified + " AS unflagged" +
|
||||
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
|
||||
@@ -85,7 +85,7 @@ public interface DaoMessage {
|
||||
@Query("SELECT message.*" +
|
||||
", account.name AS accountName, IFNULL(identity.color, account.color) AS accountColor, account.notify AS accountNotify" +
|
||||
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
||||
", COUNT(message.id) AS count" +
|
||||
", COUNT(DISTINCT message.msgid) AS count" +
|
||||
", " + unseen_folder + " AS unseen" +
|
||||
", " + unflagged_folder + " AS unflagged" +
|
||||
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
|
||||
|
||||
Reference in New Issue
Block a user