Fix queries

This commit is contained in:
Till Faelligen 2022-03-02 16:31:50 +01:00
parent 9f5c963dac
commit 4e789ab46a
2 changed files with 2 additions and 2 deletions

View file

@ -85,8 +85,8 @@ func (s *statsStatements) DailyMessages(ctx context.Context, txn *sql.Tx, prevID
func (s *statsStatements) DailySentMessages(ctx context.Context, txn *sql.Tx, prevID int64) (result int64, err error) {
stmt := sqlutil.TxStmt(txn, s.countTypesStmt)
err = stmt.QueryRowContext(ctx,
prevID,
"m.room.message",
prevID,
fmt.Sprintf("%%:%s", s.serverName),
).Scan(&result)
return

View file

@ -104,7 +104,7 @@ GROUP BY client_type
`
const countUserByAccountTypeSQL = `
SELECT COUNT(*) FROM account_accounts WHERE account_type IN $1
SELECT COUNT(*) FROM account_accounts WHERE account_type = $1
`
const countRegisteredUserByTypeStmt = `