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.x (alias val) Function in (children 1) ExpressionList (children 2) Function tuple (children 1) ExpressionList (children 2) Identifier key Identifier val Function tuple (children 1) ExpressionList (children 1) Literal Tuple_(UInt64_1, UInt64_1)