SelectWithUnionQuery (children 1)
 ExpressionList (children 1)
  SelectQuery (children 3)
   ExpressionList (children 1)
    Identifier td_d
   TablesInSelectQuery (children 1)
    TablesInSelectQueryElement (children 1)
     TableExpression (children 1)
      Subquery (children 1)
       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 tdt
           TablesInSelectQueryElement (children 2)
            TableExpression (children 1)
             TableIdentifier td (alias t)
            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
   Function equals (children 1)
    ExpressionList (children 2)
     Identifier td_d
     Literal \'2025-04-01\'
