add hints to replace HAVING by WHERE clauses