WITH A AS (
select 1 as no from dual
union all
select 1 as no from dual
union all
select 1 as no from dual
union all
select 2 as no from dual
union all
select 2 as no from dual
union all
select 3 as no from dual
)
select count(no)"总共有多少行",
count(distinct no) "distinct的数量",
count(no) - count(distinct no) "重复的行数"
from A;