查询用户编号为1165的所有数据:
select * from T_JianKangJC_JianCeSJ where JianCeCSID in (19,7,1,2,20,15) and YongHuID='1165' order by JianCeID desc
查询用户编号为1165且监测参数为(1,2,7,15,19,20)的最新数据:
select * from T_JianKangJC_JianCeSJ a where exists( select * from ( select JianCeCSID,max(JianCeSJ) as FTime from T_JianKangJC_JianCeSJ where YongHuID='1165' and JianCeCSID in (19,7,1,2,20,15) group by JianCeCSID ) x where x.JianCeCSID=a.JianCeCSID and a.JianCeSJ=x.FTime )