zOs/SQL/CATULDA

select     dt,                                          char(' '),
           char(count(all tid150tst)) tst_all,          char(' '),
           char(count(distinct tid150tst)) tst_dist,    char(' '),
           char(coalesce(
             char(min(tid150md))                     || ' ' ||
             char(max(tid150md))                     || ' ' ||
             char(min(tid150tst))                    || ' ' ||
             char(max(tid150tst))
             , '<<null>>'))
  from (
    select DATE(tiD150tst) dt, tid150tst, tid150md

      from OA1A.tid150a1
    ) d
    group by dt order by dt
           ;