<commit_before>WITH appropriation_a35_{0} AS 
    (SELECT row_number,
        deobligations_recoveries_r_cpe,
        tas_id,
        submission_id
    FROM appropriation
    WHERE submission_id = {0})
SELECT
    approp.row_number,
    approp.deobligations_recoveries_r_cpe,
    SUM(op.ussgl487100_downward_adjus_cpe) as ussgl487100_downward_adjus_cpe_sum,
    SUM(op.ussgl497100_downward_adjus_cpe) as ussgl497100_downward_adjus_cpe_sum,
    SUM(op.ussgl487200_downward_adjus_cpe) as ussgl487200_downward_adjus_cpe_sum,
    SUM(op.ussgl497200_downward_adjus_cpe) as ussgl497200_downward_adjus_cpe_sum
FROM appropriation_a35_{0} AS approp
    JOIN object_class_program_activity op ON approp.tas_id = op.tas_id
	    AND approp.submission_id = op.submission_id
GROUP BY approp.row_number, approp.deobligations_recoveries_r_cpe
HAVING approp.deobligations_recoveries_r_cpe <>
        (SUM(op.ussgl487100_downward_adjus_cpe) +
        SUM(op.ussgl497100_downward_adjus_cpe) +
        SUM(op.ussgl487200_downward_adjus_cpe) +
        SUM(op.ussgl497200_downward_adjus_cpe))<commit_msg>Speeding up a35<commit_after>WITH appropriation_a35_{0} AS 
    (SELECT row_number,
        deobligations_recoveries_r_cpe,
        tas_id
    FROM appropriation
    WHERE submission_id = {0}),
ocpa_a35_{0} AS
    (SELECT tas_id,
        ussgl487100_downward_adjus_cpe,
        ussgl497100_downward_adjus_cpe,
        ussgl487200_downward_adjus_cpe,
        ussgl497200_downward_adjus_cpe
    FROM object_class_program_activity
    WHERE submission_id = {0})
SELECT
    approp.row_number,
    approp.deobligations_recoveries_r_cpe,
    SUM(op.ussgl487100_downward_adjus_cpe) as ussgl487100_downward_adjus_cpe_sum,
    SUM(op.ussgl497100_downward_adjus_cpe) as ussgl497100_downward_adjus_cpe_sum,
    SUM(op.ussgl487200_downward_adjus_cpe) as ussgl487200_downward_adjus_cpe_sum,
    SUM(op.ussgl497200_downward_adjus_cpe) as ussgl497200_downward_adjus_cpe_sum
FROM appropriation_a35_{0} AS approp
    JOIN ocpa_a35_{0} AS op ON approp.tas_id = op.tas_id
GROUP BY approp.row_number, approp.deobligations_recoveries_r_cpe
HAVING approp.deobligations_recoveries_r_cpe <>
        (SUM(op.ussgl487100_downward_adjus_cpe) +
        SUM(op.ussgl497100_downward_adjus_cpe) +
        SUM(op.ussgl487200_downward_adjus_cpe) +
        SUM(op.ussgl497200_downward_adjus_cpe))
{'fraction_non_alphanumeric': 0.05807002561912895, 'fraction_numerical': 0.08155422715627669, 'mean_word_length': 4.946700507614213, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3743705', 'n_tokens_mistral': 1106, 'n_tokens_neox': 962, 'n_words': 113}