You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Select the last 100 transactions, group by account and return the
109
+
// top 5 most used accounts ordered by usage count desc.
110
+
final result =await db.rawQuery('''
111
+
SELECT b.*
112
+
FROM "$bankAccountTable" b
113
+
JOIN (
114
+
SELECT * FROM "$transactionTable"
115
+
ORDER BY "${TransactionFields.date}" DESC
116
+
LIMIT 100
117
+
) t ON t."${TransactionFields.idBankAccount}" = b."${BankAccountFields.id}" OR t."${TransactionFields.idBankAccountTransfer}" = b."${BankAccountFields.id}"
118
+
WHERE b."${BankAccountFields.active}" = 1 AND ${BankAccountFields.deletedAt} IS NULL
0 commit comments