第1个回答 2012-11-22
select distinct x, y from t;
第2个回答 推荐于2017-09-04
第一种方式:
select distinct x, y from t;
第二种方式:
select x,y from t group by x,y
推荐第二种方式本回答被提问者和网友采纳
第3个回答 2012-11-22
select distinct x, y from t;
或者
select x,y from (select x,y,count(*) from t group by x,y) b;
第4个回答 2012-11-22
select temp.x, temp.yfrom (
select t.x, t.y, row_number() OVER(PARTITION BY x ORDER BY t.y desc) as row_flg from t t ) tempwhere temp.row_flg = '1'