CreateQuery goal (children 3)
 Identifier goal
 Columns definition (children 1)
  ExpressionList (children 5)
   ColumnDeclaration CounterID (children 1)
    DataType UInt32
   ColumnDeclaration StartDate (children 1)
    DataType Date
   ColumnDeclaration GoalID (children 1)
    DataType UInt32
   ColumnDeclaration Visits (children 1)
    DataType AggregateFunction (children 1)
     ExpressionList (children 3)
      Identifier sumIf
      DataType Int8
      DataType UInt8
   ColumnDeclaration GoalReaches (children 1)
    DataType AggregateFunction (children 1)
     ExpressionList (children 2)
      Identifier sum
      DataType Int8
 Storage definition (children 4)
  Function AggregatingMergeTree
  Function toStartOfMonth (children 1)
   ExpressionList (children 1)
    Identifier StartDate
  Function tuple (children 1)
   ExpressionList (children 3)
    Identifier CounterID
    Identifier StartDate
    Identifier GoalID
  Set
