SELECT NODE_NAME, COUNT(DISTINCT VOLUME_NAME) AS VOLUME_COUNT FROM VOLUMEUSAGE GROUP BY NODE_NAME ORDER BY NODE_NAME
or in reverse order
SELECT NODE_NAME, COUNT(DISTINCT VOLUME_NAME) AS VOLUME_COUNT FROM VOLUMEUSAGE GROUP BY NODE_NAME ORDER BY NODE_NAME DESC
Posted in: Helpful TSM SQL Commands