v.22.12Bug Fix

Fixed Exception for Subqueries with HAVING Clause Without Aggregation

Fixed exception when a subquery contains HAVING but doesn't contain an actual aggregation. #44051 (Nikita Taranov).