<commit_before>delimiter $$

drop procedure if exists new_high_low$$
create procedure new_high_low()
begin
    truncate table tmp_high_low;

    insert into tmp_high_low( sensor_id, min_value, max_value )
        select sensor_id
        ,      min(value)
        ,      max(value)
        from   sensor_data
        where   d.timestamp >= date_sub(NOW(), interval 8 hour)
        group by sensor_id;

    -- Save changes
    commit;
end$$

drop procedure if exists update_high_low$$
create procedure update_high_low()
begin
    insert into sensor_high_low( sensor_id, min_value, max_value )
        select x.sensor_id
        ,      x.min_value
        ,      x.max_value
        from   tmp_high_low x<commit_msg>Correction for query<commit_after>delimiter $$

drop procedure if exists new_high_low$$
create procedure new_high_low()
begin
    truncate table tmp_high_low;

    insert into tmp_high_low( sensor_id, min_value, max_value )
        select sensor_id
        ,      min(value)
        ,      max(value)
        from   sensor_data
        where  timestamp >= date_sub(NOW(), interval 8 hour)
        group by sensor_id;

    -- Save changes
    commit;
end$$

drop procedure if exists update_high_low$$
create procedure update_high_low()
begin
    insert into sensor_high_low( sensor_id, min_value, max_value )
        select x.sensor_id
        ,      x.min_value
        ,      x.max_value
        from   tmp_high_low x
{'fraction_non_alphanumeric': 0.06494413407821228, 'fraction_numerical': 0.0013966480446927375, 'mean_word_length': 2.5036674816625917, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2795353', 'n_tokens_mistral': 440, 'n_tokens_neox': 431, 'n_words': 121}