0

I have a table named table1 where datas are entered as below.

slno scxid exid cv `witheffectdate

2007 2133550002012-03-01 00:00:00.000`

2008 2143510002012-03-01 00:00:00.000`

2009 215355002012-03-01 00:00:00.000`

2010 2133570002012-04-01 00:00:00.000`

2011 2143515002012-04-01 00:00:00.000`

2012 215357002012-04-01 00:00:00.000`

I need to only display the data of exid=35 with maximum witheffectdate only. That is here display only datas from slno 2010 to 2012. Please helpme.

4

1 回答 1

0
select slno, scxid, exid, cv,  max(witheffectdate) 
from table1
where exid=35
于 2012-05-11T07:03:48.420 回答