CreateQuery v (children 2)
 Identifier v
 SelectWithUnionQuery (children 1)
  ExpressionList (children 1)
   SelectQuery (children 3)
    ExpressionList (children 3)
     Identifier t.id (alias td_id)
     Identifier t.d (alias td_d)
     Function uniqExact (alias cnt) (children 1)
      ExpressionList (children 1)
       Identifier tdt.id
    TablesInSelectQuery (children 2)
     TablesInSelectQueryElement (children 1)
      TableExpression (children 1)
       TableIdentifier td (alias t)
     TablesInSelectQueryElement (children 2)
      TableExpression (children 1)
       TableIdentifier tdt
      TableJoin (children 1)
       Function equals (children 1)
        ExpressionList (children 2)
         Function toDate (children 1)
          ExpressionList (children 1)
           Identifier tdt.dt
         Identifier t.d
    ExpressionList (children 2)
     Identifier td_id
     Identifier td_d
