Fix for Incorrect Results in Queries with IN (Subquery) and Aggregate Projections
Official CH changelog text
Queries with condition like IN (subquery) could return incorrect result in case if aggregate projection applied. Fixed creation of sets for projections. #30310 (Amos Bird).