select cod_mov,max(num_doc) from intb00006 where num_doc < 1000 group by 1