====== Oracle - SQL - Count - Count ====== A query can be wrapped in another SELECT: select count(*) from ( select count(SID) tot -- add alias from Test where Date = '2012-12-10' group by SID ) select count(*) from (Select COLUMNS from SCHEMA.TABLE where nvl(TRADING_BRANCH||TRADING_ACCOUNT, 'ZZZZ') = 'ZZZZ' and LEGACY_PARTNER_TYPE in ('DELIVERY', 'MND')) select column_name, count(column_name) from table group by column_name having count (column_name) > 1;