diff --git a/idb/postgres/postgres.go b/idb/postgres/postgres.go index 4d17b9ed..eded0d25 100644 --- a/idb/postgres/postgres.go +++ b/idb/postgres/postgres.go @@ -2032,7 +2032,7 @@ func (db *IndexerDb) buildAccountQuery(opts idb.AccountQueryOptions, countOnly b partNumber++ } if opts.OnlineOnly { - whereParts = append(whereParts, "(a.account_data->>'onl' IS NOT NULL) and (account_data->>'voteLst' IS NOT NULL) and ((a.account_data->>'onl') = '1')") + whereParts = append(whereParts, "(a.account_data->>'onl' IS NOT NULL) AND (account_data->>'voteLst' IS NOT NULL) AND ((a.account_data->>'onl') = '1')") } query = `SELECT a.addr, a.microalgos, a.rewards_total, a.created_at, a.closed_at, a.deleted, a.rewardsbase, a.keytype, a.account_data FROM account a` if opts.HasAssetID != 0 {