select * from document_data 
 where right(document_id,4) = 
(select max(right(document_id,4)) from document_data)