How to unify two records with same field?
Use GROUP BY to get one output row per cod, and use aggregate functions to select one value to output. For the doc values, use CASE to select only one of them (it returns NULL in a row where it does not match):

SELECT cod,
       name,
       max(CASE date_row WHEN 1 THEN doc1 END) AS doc1,
       max(CASE date_row WHEN 2 THEN doc1 END) AS doc2,
       max(cpf) AS cpf
FROM my_table
GROUP BY cod,
         name
ORDER BY cod;