SQL如何按条件取唯一值?

2025-02-22 23:31:53
推荐回答(4个)
回答1:

根据你想查的结果来看应该是这样的:
select A,min(B) from tablename group by A;

回答2:

select A,max(B) from 表名 group by A

回答3:

select A,max(B) from tablename group by A;

回答4:

那你的保证你的条件是唯一的