I have 2 queries with only one difference that I want to merge in just one query
It will be something close to

SELECT 
    titulo_id as titulo_id,
-- calculate both SUMs, select values for each dependent by what value it matches to
    SUM(CASE WHEN ativos_extratos.data_import_id = borders.min_id THEN valor_bruto_atual END) AS valor_min,
    SUM(CASE WHEN ativos_extratos.data_import_id = borders.max_id THEN valor_bruto_atual END) AS valor_max,
    data_imports.data_import AS created_at,
    week(data_imports.data_import) AS weeknumber
FROM
    ativos_extratos
        INNER JOIN
    titulos ON titulo_id = titulos.id
        INNER JOIN
    representantes ON representante_id = representantes.id
        INNER JOIN
    data_imports ON data_import_id = data_imports.id
-- moved subquery and condition by it from WHERE 
    INNER JOIN ( SELECT 
                    MIN(ID) as min_id,
                    MAX(ID) as max_id
                 FROM
                    data_imports
                 WHERE
                    data_import BETWEEN '2018-11-01' AND '2018-12-10'
                 GROUP BY week(data_import)
               ) borders ON ativos_extratos.data_import_id IN (borders.min_id, borders.max_id)
WHERE
    user_id = 1
-- removed subquery and condition were there
        AND data_imports.data_import BETWEEN '2018-11-01' AND '2018-12-10'
GROUP BY titulos.nome_titulo , weeknumber


I am too lazy to debug - do it by yourself.