select xsbm,zcsl
from your_table a
where a.jzshbz=2
and a.lsh=
(select max(lsh) from your_table b
where b.xsbm=a.xsbm and b.jzshbz=2)
from your_table a
where a.jzshbz=2
and a.lsh=
(select max(lsh) from your_table b
where b.xsbm=a.xsbm and b.jzshbz=2)
select xsbm,zcsl group by xsbm lsh=(select max(lsh) from table group by xsbm ) and jzshbz=2;
from your_table a
where a.jzshbz=2
and a.lsh=
(select max(lsh) from your_table b
where b.xsbm=a.xsbm and b.jzshbz=2)
table
where (jzshbz = 2 ) and (lsh = (select max(lsh) from table where jzshbz =2))
(select max(lsh) from table_name);
你是不是在SQL Server区发了贴?!好像那边有答案了~~~
(select max(lsh) from table_name group by xsbm);