Sql Server Max Between Two Values