zOs/SQL/CATTBCLU
select substr(strip(t.creator) || '.' || strip(t.name), 1, 20),
i.*
from sysibm.sysTables t
left join ( select count(*) "ixCnt",
sum(case when clustering = 'Y' then 1 else 0 end) "cluCnt",
sum(case when clustering = 'N' then 1 else 0 end) "NoClCnt",
max(case when clustering <> 'Y' then ''
else substr(strip(j.creator) || '.' || strip(j.name)
, 1, 20) end) "cluIx",
tbCreator, tbName
from sysibm.sysIndexes j
group by tbcreator, tbname
) i
on i.tbCreator = t.creator and i.tbName = t.name
where t.dbName like 'VV%' and t.type = 'T'
with ur