[fix] HAVING clause error