select 客户名称 from t group by 客户名称 having count(1)>=2;
select distinct 产品名称,产品类别,
(sum(金额) over(partition by 产品名称)) / (sum(金额) over(partition by 产品类别)) s
from t;
select * from
(select 客户名称,sum(金额) s from t group by 客户名称 order by s desc)
where rownum
select 客户名称
from
(select 客户名称,交易时间-ro r from
(select 客户名称,交易时间,
row_number() over(partition by 客户名称) ro
from t order by 客户名称,交易时间))
group by 客户名称,r
having count(1)>=3;
\N是空值