-- ==============================================
-- 6. CREATE EXPERIMENTS FOR PHASE 2
-- ==============================================

-- This seed file creates experiments from phase_2_JC_experimental_run_sheet.csv
-- Each experiment has 3 repetitions with specific parameters
-- Experiment numbers are incremented by 1 (CSV 0-19 becomes DB 1-20)

-- Create experiments
INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    1,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    2,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    3,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    4,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    5,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    6,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    7,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    8,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    9,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    10,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    11,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    12,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    13,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    14,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    15,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    16,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    17,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    18,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    19,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

INSERT INTO public.experiments (experiment_number, reps_required, weight_per_repetition_lbs, phase_id, created_by)
VALUES (
    20,
    3,
    33,
    (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments'),
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Create repetitions for each experiment
-- Note: Phase executions are automatically created by trigger when repetitions are inserted

-- Experiment 1, Repetition 1 (CSV experiment_number 0)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 1 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 1, Repetition 2 (CSV experiment_number 0)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 1 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 1, Repetition 3 (CSV experiment_number 0)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 1 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 2, Repetition 1 (CSV experiment_number 1)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 2 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 2, Repetition 2 (CSV experiment_number 1)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 2 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 2, Repetition 3 (CSV experiment_number 1)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 2 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 3, Repetition 1 (CSV experiment_number 2)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 3 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 3, Repetition 2 (CSV experiment_number 2)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 3 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 3, Repetition 3 (CSV experiment_number 2)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 3 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 4, Repetition 1 (CSV experiment_number 3)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 4 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 4, Repetition 2 (CSV experiment_number 3)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 4 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 4, Repetition 3 (CSV experiment_number 3)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 4 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 5, Repetition 1 (CSV experiment_number 4)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 5 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 5, Repetition 2 (CSV experiment_number 4)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 5 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 5, Repetition 3 (CSV experiment_number 4)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 5 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 6, Repetition 1 (CSV experiment_number 5)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 6 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 6, Repetition 2 (CSV experiment_number 5)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 6 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 6, Repetition 3 (CSV experiment_number 5)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 6 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 7, Repetition 1 (CSV experiment_number 6)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 7 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 7, Repetition 2 (CSV experiment_number 6)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 7 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 7, Repetition 3 (CSV experiment_number 6)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 7 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 8, Repetition 1 (CSV experiment_number 7)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 8 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 8, Repetition 2 (CSV experiment_number 7)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 8 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 8, Repetition 3 (CSV experiment_number 7)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 8 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 9, Repetition 1 (CSV experiment_number 8)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 9 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 9, Repetition 2 (CSV experiment_number 8)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 9 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 9, Repetition 3 (CSV experiment_number 8)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 9 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 10, Repetition 1 (CSV experiment_number 9)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 10 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 10, Repetition 2 (CSV experiment_number 9)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 10 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 10, Repetition 3 (CSV experiment_number 9)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 10 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 11, Repetition 1 (CSV experiment_number 10)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 11 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 11, Repetition 2 (CSV experiment_number 10)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 11 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 11, Repetition 3 (CSV experiment_number 10)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 11 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 12, Repetition 1 (CSV experiment_number 11)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 12 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 12, Repetition 2 (CSV experiment_number 11)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 12 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 12, Repetition 3 (CSV experiment_number 11)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 12 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 13, Repetition 1 (CSV experiment_number 12)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 13 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 13, Repetition 2 (CSV experiment_number 12)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 13 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 13, Repetition 3 (CSV experiment_number 12)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 13 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 14, Repetition 1 (CSV experiment_number 13)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 14 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 14, Repetition 2 (CSV experiment_number 13)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 14 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 14, Repetition 3 (CSV experiment_number 13)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 14 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 15, Repetition 1 (CSV experiment_number 14)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 15 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 15, Repetition 2 (CSV experiment_number 14)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 15 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 15, Repetition 3 (CSV experiment_number 14)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 15 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 16, Repetition 1 (CSV experiment_number 15)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 16 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 16, Repetition 2 (CSV experiment_number 15)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 16 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 16, Repetition 3 (CSV experiment_number 15)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 16 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 17, Repetition 1 (CSV experiment_number 16)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 17 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 17, Repetition 2 (CSV experiment_number 16)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 17 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 17, Repetition 3 (CSV experiment_number 16)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 17 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 18, Repetition 1 (CSV experiment_number 17)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 18 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 18, Repetition 2 (CSV experiment_number 17)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 18 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 18, Repetition 3 (CSV experiment_number 17)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 18 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 19, Repetition 1 (CSV experiment_number 18)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 19 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 19, Repetition 2 (CSV experiment_number 18)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 19 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 19, Repetition 3 (CSV experiment_number 18)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 19 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 20, Repetition 1 (CSV experiment_number 19)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 20 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    1,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 20, Repetition 2 (CSV experiment_number 19)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 20 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    2,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Experiment 20, Repetition 3 (CSV experiment_number 19)
INSERT INTO public.experiment_repetitions (experiment_id, repetition_number, created_by)
VALUES (
    (SELECT id FROM public.experiments WHERE experiment_number = 20 AND phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    3,
    (SELECT id FROM public.user_profiles WHERE email = 's.alireza.v@gmail.com')
);

-- Update phase executions with parameters from CSV

-- Experiment 1, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 2040
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 1
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 19
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 1
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 1, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 2040
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 1
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 19
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 1
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 1, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 2040
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 1
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 19
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 1
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 2, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1440
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 2
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 27
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 2
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 2, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1440
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 2
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 27
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 2
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 2, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1440
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 2
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 27
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 2
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 3, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 2280
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 3
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 10
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 3
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 3, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 2280
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 3
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 10
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 3
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 3, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 2280
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 3
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 10
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 3
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 4, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 660
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 4
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 36
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 4
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 4, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 660
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 4
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 36
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 4
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 4, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 660
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 4
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 36
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 4
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 5, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 780
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 5
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 41
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 5
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 5, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 780
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 5
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 41
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 5
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 5, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 780
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 5
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 41
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 5
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 6, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1800
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 6
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 33
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 6
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 6, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1800
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 6
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 33
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 6
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 6, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1800
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 6
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 33
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 6
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 7, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 600
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 7
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 22
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 7
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 7, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 600
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 7
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 22
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 7
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 7, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 600
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 7
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 22
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 7
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 8, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 900
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 8
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 30
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 8
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 8, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 900
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 8
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 30
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 8
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 8, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 900
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 8
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 30
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 8
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 9, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1620
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 9
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 12
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 9
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 9, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1620
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 9
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 12
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 9
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 9, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1620
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 9
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 12
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 9
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 10, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1920
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 10
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 26
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 10
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 10, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1920
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 10
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 26
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 10
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 10, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1920
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 10
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 26
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 10
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 11, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1560
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 11
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 60
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 11
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 11, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1560
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 11
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 60
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 11
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 11, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1560
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 11
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 60
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 11
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 12, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1440
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 12
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 12
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 12, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1440
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 12
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 12
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 12, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1440
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 12
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 12
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 13, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1680
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 13
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 13
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 13, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1680
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 13
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 13
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 13, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1680
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 13
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 13
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 14, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1260
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 14
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 14
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 14, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1260
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 14
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 14
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 14, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1260
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 14
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 14
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 15, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1320
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 15
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 15
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 15, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1320
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 15
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 15
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 15, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1320
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 15
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 15
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 16, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 960
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 16
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 60
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 16
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 16, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 960
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 16
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 60
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 16
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 16, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 960
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 16
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 60
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 16
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 17, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1200
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 17
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 17
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 17, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1200
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 17
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 17
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 17, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1200
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 17
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 59
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 17
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 18, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 2040
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 18
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 60
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 18
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 18, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 2040
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 18
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 60
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 18
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 18, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 2040
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 18
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 60
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 18
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 19, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1080
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 19
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 49
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 19
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 19, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1080
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 19
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 49
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 19
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 19, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 1080
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 19
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 49
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 19
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 20, Repetition 1 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 660
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 20
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 25
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 20
    AND er.repetition_number = 1
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 20, Repetition 2 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 660
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 20
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 25
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 20
    AND er.repetition_number = 2
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Experiment 20, Repetition 3 - Update phase executions
UPDATE public.experiment_phase_executions
SET soaking_duration_minutes = 660
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 20
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'soaking';

UPDATE public.experiment_phase_executions
SET duration_minutes = 25
WHERE repetition_id = (
    SELECT er.id FROM public.experiment_repetitions er
    JOIN public.experiments e ON er.experiment_id = e.id
    WHERE e.experiment_number = 20
    AND er.repetition_number = 3
    AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')
)
AND phase_type = 'airdrying';

-- Create JC cracker parameters for each repetition
-- Each parameter set is linked to its repetition via repetition_id

-- Experiment 1, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 1
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    53.0,
    28.0,
    0.05,
    -0.09
);

-- Experiment 1, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 1
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    53.0,
    28.0,
    0.05,
    -0.09
);

-- Experiment 1, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 1
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    53.0,
    28.0,
    0.05,
    -0.09
);

-- Experiment 2, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 2
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    34.0,
    29.0,
    0.03,
    0.01
);

-- Experiment 2, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 2
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    34.0,
    29.0,
    0.03,
    0.01
);

-- Experiment 2, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 2
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    34.0,
    29.0,
    0.03,
    0.01
);

-- Experiment 3, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 3
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    60.0,
    28.0,
    0.06,
    -0.1
);

-- Experiment 3, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 3
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    60.0,
    28.0,
    0.06,
    -0.1
);

-- Experiment 3, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 3
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    60.0,
    28.0,
    0.06,
    -0.1
);

-- Experiment 4, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 4
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    42.0,
    13.0,
    0.07,
    -0.07
);

-- Experiment 4, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 4
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    42.0,
    13.0,
    0.07,
    -0.07
);

-- Experiment 4, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 4
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    42.0,
    13.0,
    0.07,
    -0.07
);

-- Experiment 5, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 5
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    41.0,
    38.0,
    0.05,
    0.03
);

-- Experiment 5, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 5
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    41.0,
    38.0,
    0.05,
    0.03
);

-- Experiment 5, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 5
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    41.0,
    38.0,
    0.05,
    0.03
);

-- Experiment 6, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 6
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    30.0,
    36.0,
    0.05,
    -0.04
);

-- Experiment 6, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 6
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    30.0,
    36.0,
    0.05,
    -0.04
);

-- Experiment 6, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 6
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    30.0,
    36.0,
    0.05,
    -0.04
);

-- Experiment 7, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 7
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    37.0,
    30.0,
    0.06,
    0.02
);

-- Experiment 7, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 7
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    37.0,
    30.0,
    0.06,
    0.02
);

-- Experiment 7, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 7
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    37.0,
    30.0,
    0.06,
    0.02
);

-- Experiment 8, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 8
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    35.0,
    32.0,
    0.05,
    -0.07
);

-- Experiment 8, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 8
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    35.0,
    32.0,
    0.05,
    -0.07
);

-- Experiment 8, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 8
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    35.0,
    32.0,
    0.05,
    -0.07
);

-- Experiment 9, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 9
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    55.0,
    24.0,
    0.04,
    0.04
);

-- Experiment 9, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 9
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    55.0,
    24.0,
    0.04,
    0.04
);

-- Experiment 9, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 9
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    55.0,
    24.0,
    0.04,
    0.04
);

-- Experiment 10, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 10
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    47.0,
    26.0,
    0.07,
    0.03
);

-- Experiment 10, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 10
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    47.0,
    26.0,
    0.07,
    0.03
);

-- Experiment 10, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 10
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    47.0,
    26.0,
    0.07,
    0.03
);

-- Experiment 11, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 11
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    44.0,
    12.0,
    0.08,
    -0.1
);

-- Experiment 11, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 11
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    44.0,
    12.0,
    0.08,
    -0.1
);

-- Experiment 11, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 11
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    44.0,
    12.0,
    0.08,
    -0.1
);

-- Experiment 12, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 12
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    42.0,
    25.0,
    0.07,
    -0.05
);

-- Experiment 12, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 12
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    42.0,
    25.0,
    0.07,
    -0.05
);

-- Experiment 12, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 12
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    42.0,
    25.0,
    0.07,
    -0.05
);

-- Experiment 13, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 13
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    37.0,
    23.0,
    0.06,
    -0.08
);

-- Experiment 13, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 13
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    37.0,
    23.0,
    0.06,
    -0.08
);

-- Experiment 13, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 13
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    37.0,
    23.0,
    0.06,
    -0.08
);

-- Experiment 14, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 14
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    41.0,
    21.0,
    0.06,
    -0.09
);

-- Experiment 14, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 14
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    41.0,
    21.0,
    0.06,
    -0.09
);

-- Experiment 14, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 14
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    41.0,
    21.0,
    0.06,
    -0.09
);

-- Experiment 15, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 15
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    45.0,
    17.0,
    0.07,
    -0.08
);

-- Experiment 15, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 15
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    45.0,
    17.0,
    0.07,
    -0.08
);

-- Experiment 15, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 15
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    45.0,
    17.0,
    0.07,
    -0.08
);

-- Experiment 16, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 16
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    30.0,
    24.0,
    0.07,
    0.02
);

-- Experiment 16, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 16
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    30.0,
    24.0,
    0.07,
    0.02
);

-- Experiment 16, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 16
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    30.0,
    24.0,
    0.07,
    0.02
);

-- Experiment 17, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 17
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    41.0,
    14.0,
    0.07,
    0.04
);

-- Experiment 17, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 17
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    41.0,
    14.0,
    0.07,
    0.04
);

-- Experiment 17, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 17
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    41.0,
    14.0,
    0.07,
    0.04
);

-- Experiment 18, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 18
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    34.0,
    29.0,
    0.07,
    -0.09
);

-- Experiment 18, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 18
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    34.0,
    29.0,
    0.07,
    -0.09
);

-- Experiment 18, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 18
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    34.0,
    29.0,
    0.07,
    -0.09
);

-- Experiment 19, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 19
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    38.0,
    35.0,
    0.07,
    -0.08
);

-- Experiment 19, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 19
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    38.0,
    35.0,
    0.07,
    -0.08
);

-- Experiment 19, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 19
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    38.0,
    35.0,
    0.07,
    -0.08
);

-- Experiment 20, Repetition 1 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 20
     AND er.repetition_number = 1
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    56.0,
    34.0,
    0.06,
    -0.09
);

-- Experiment 20, Repetition 2 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 20
     AND er.repetition_number = 2
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    56.0,
    34.0,
    0.06,
    -0.09
);

-- Experiment 20, Repetition 3 - JC Cracker Parameters
INSERT INTO public.jc_cracker_parameters (
    repetition_id,
    plate_contact_frequency_hz,
    throughput_rate_pecans_sec,
    crush_amount_in,
    entry_exit_height_diff_in
) VALUES (
    (SELECT er.id FROM public.experiment_repetitions er
     JOIN public.experiments e ON er.experiment_id = e.id
     WHERE e.experiment_number = 20
     AND er.repetition_number = 3
     AND e.phase_id = (SELECT id FROM public.experiment_phases WHERE name = 'Phase 2 of JC Experiments')),
    56.0,
    34.0,
    0.06,
    -0.09
);
