diff --git a/finisher_api.go b/finisher_api.go index fc7a73be..d36dc754 100644 --- a/finisher_api.go +++ b/finisher_api.go @@ -377,7 +377,7 @@ func (db *DB) Count(count *int64) (tx *DB) { } tx.Statement.AddClause(clause.Select{Expression: expr}) - defer tx.Statement.AddClause(clause.Select{}) + defer delete(tx.Statement.Clauses, "SELECT") } if orderByClause, ok := db.Statement.Clauses["ORDER BY"]; ok {