InsertQuery (children 2) Identifier partitions SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 3) ExpressionList (children 2) Function plus (alias EventDate) (children 1) ExpressionList (children 2) Identifier EventDate Function modulo (children 1) ExpressionList (children 2) Identifier UserID Literal UInt64_365 Identifier CounterID TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) TableIdentifier test.hits Function and (children 1) ExpressionList (children 2) Function equals (children 1) ExpressionList (children 2) Identifier CounterID Literal UInt64_1704509 Function equals (children 1) ExpressionList (children 2) Function toStartOfMonth (children 1) ExpressionList (children 1) Identifier EventDate Function toDate (children 1) ExpressionList (children 1) Literal \'2014-03-01\'