zOs/SQL/CATTSDS

select dssize, case when partitions = 0 then 'not' else 'part' end
      , count(*)
    from sysibm.sysTablespace
    group by dssize, case when partitions = 0 then 'not' else 'part' end