SELECT CONVERT(varchar(20),next_folo_date,101),insp_id
FROM Followup
WHERE folo_id = (Select Max(folo_id - 1) From Followup WHERE assess_id = 291 and folo_cnty_id = '065')


I need to get insp_id from 2nd last row and Max folo_id -1 will not work.
eg. Max folo_id for assess_id= 291,292,399 and 500 and 500-1 will be 499. witch may be entered for some other assess_id. I want to catch 399.
Any easy solution or I need to get count for the assessid 291 and catch the id for count-1.
Thanks for your help.