def load_candidate_committees(self):
        self.log(" Loading candidate committees")

        sql = """
        INSERT INTO %s (
            filer_id,
            filer_id_raw,
            xref_filer_id,
            name,
            committee_type,
            party,
            level_of_government,
            effective_date,
            status
        )
        SELECT
            tmp_cand2cmte.`candidate_filer_pk` as filer_id,
            distinct_filers.`filer_id` as filer_id_raw,
            distinct_filers.`xref_filer_id` as xref_filer_id,
            distinct_filers.`name` as name,
            'cand' as committee_type,
            distinct_filers.`party` as party,
            distinct_filers.`level_of_government` as level_of_government,
            distinct_filers.`effective_date` as effective_date,
            distinct_filers.`status` as status
        FROM tmp_cand2cmte
        INNER JOIN (
            SELECT
                fn.`FILER_ID` as filer_id,
                fn.`XREF_FILER_ID` as xref_filer_id,
                REPLACE(
                    TRIM(
                        CONCAT(`NAMT`, " ", `NAMF`, " ", `NAML`, " ", `NAMS`)
                    ),
                    '  ',
                    ' '
                ) as name,
                max.`party`,
                max.`level_of_government`,
                max.`effective_date`,
                max.`status`
            FROM FILERNAME_CD as fn
            INNER JOIN tmp_max_filers_with_metadata as max
            ON fn.`id` = max.`max_id`
        ) as distinct_filers
        ON tmp_cand2cmte.`committee_filer_id` = distinct_filers.`filer_id`;
        """ % (models.Committee._meta.db_table,)

        self.conn.execute(sql)
Loads the committees associated with candidates into the Committee
dataset/ETHPy150Open california-civic-data-coalition/django-calaccess-campaign-browser/calaccess_campaign_browser/management/commands/loadcalaccesscampaignfilers.py/Command.load_candidate_committees