单列
select distinct colA from a;
多列
select distinct colA,colB from a;
select distinct row(colA,colB) from a;
所有列
select distinct * from a;
但是如果还需要聚合,presto 不支持以下写法
select count(distinct *) from a;
可以用如下写法代替
select count(*) from
(select distinct * from a)t1;