select f1,max(f2) from tb group by f1 select f1,min(f2) from tb group by f1
select f1,f2 from tb where exists(select distinct f1 from tb)
select f1,max(f2) f2 from tb group by f1
--如果你要f2的最大值 select f1,max(f2) f2 from tb group by f1 --如果你要f2的最小值 select f1,min(f2) f2 from tb group by f1
select f1,max(f2) f2 from tb group by f1--或:select f1,min(f2) f2 from tb group by f1
select f1,max(f2) f2 from tb group by f1--或:select f1,min(f2) f2 from tb group by f1如果有其他列:select * from tb tem where f2=(select max(f2) from tb where t1=tem.t1)
select f1,max(f2) from tb group by f1 select f1,min(f2) from tb group by f1
奇怪,我没说要求最大值最小值呀..怎么个个都用上max,min了... 回复人: crazycyber(没新意) ( ) 信誉:100 2003-09-18 11:48:00 得分:0 select f1,f2 from tb where exists(select distinct f1 from tb)就一个对...谢谢..:)
select f1,min(f2) from tb group by f1
where exists(select distinct f1 from tb)
select f1,max(f2) f2 from tb group by f1
--如果你要f2的最小值
select f1,min(f2) f2 from tb group by f1
select f1,min(f2) from tb group by f1
select f1,f2 from tb
where exists(select distinct f1 from tb)就一个对...谢谢..:)