SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 3) ExpressionList (children 1) Function count (children 1) ExpressionList TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) Subquery (children 1) SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 5) ExpressionList (children 2) Identifier WatchID Function arrayDistinct (alias arr) (children 1) ExpressionList (children 1) Function groupArray (children 1) ExpressionList (children 1) Function dictGetUInt64 (children 1) ExpressionList (children 3) Literal \'db_dict.cache_hits\' Literal \'UserID\' Function toUInt64 (children 1) ExpressionList (children 1) Identifier WatchID TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) TableIdentifier test.hits_1m Function equals (children 1) ExpressionList (children 2) Function modulo (children 1) ExpressionList (children 2) Identifier WatchID Literal UInt64_7 Literal UInt64_0 ExpressionList (children 1) Identifier WatchID ExpressionList (children 1) OrderByElement (children 1) Function length (children 1) ExpressionList (children 1) Identifier arr Function equals (children 1) ExpressionList (children 2) Identifier arr Literal Array_[UInt64_0]