SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 3) ExpressionList (children 1) Function max (children 1) ExpressionList (children 1) Identifier key TablesInSelectQuery (children 2) TablesInSelectQueryElement (children 1) TableExpression (children 1) TableIdentifier tab_00612 TablesInSelectQueryElement (children 1) ArrayJoin (children 1) ExpressionList (children 1) Identifier n (alias val) Function in (children 1) ExpressionList (children 2) Function tuple (children 1) ExpressionList (children 2) Identifier key Identifier val.x Literal Tuple_(Tuple_(UInt64_1, UInt64_1), Tuple_(UInt64_2, UInt64_2))