INSERT INTO elections (id, name, counting_method, election_id, location, domain_id, category, number_of_seats, election_date, nomination_date, political_groups)
VALUES (5, 'Corrigendum 2026', 'CSO', 'GroteStad_2026', 'Grote Stad', '0000', 'Municipal', 23, '2026-03-18', '2026-02-02',
        '[
          {
            "number": 1,
            "name": "Political Group A",
            "candidates": [
              {
                "number": 1,
                "initials": "L.",
                "first_name": "Lidewij",
                "last_name": "Oud",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 2,
                "initials": "J.",
                "first_name": "Johan",
                "last_name": "Oud",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 3,
                "initials": "M.",
                "first_name": "Marijke",
                "last_name": "Oud",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 4,
                "initials": "A.",
                "first_name": "Arie",
                "last_name": "Jansen",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 5,
                "initials": "H.",
                "first_name": "Henk",
                "last_name_prefix": "van der",
                "last_name": "Weijden",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 6,
                "initials": "B.",
                "first_name": "Berta",
                "last_name_prefix": "van der",
                "last_name": "Weijden",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 7,
                "initials": "K.",
                "first_name": "Klaas",
                "last_name": "Oud",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 8,
                "initials": "S.",
                "first_name": "Sophie",
                "last_name": "Bakker",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 9,
                "initials": "J.",
                "first_name": "Johan",
                "last_name_prefix": "de",
                "last_name": "Vries",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 10,
                "initials": "M.",
                "first_name": "Marijke",
                "last_name_prefix": "van den",
                "last_name": "Berg",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 11,
                "initials": "R.",
                "first_name": "Rolf",
                "last_name_prefix": "de",
                "last_name": "Jong",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 12,
                "initials": "K.",
                "first_name": "Karin",
                "last_name": "Kok",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 13,
                "initials": "G.",
                "first_name": "Gert",
                "last_name": "Smit",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 14,
                "initials": "E.",
                "first_name": "Eva",
                "last_name": "Koster",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 15,
                "initials": "L.",
                "first_name": "Leon",
                "last_name": "Hofman",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 16,
                "initials": "S.",
                "first_name": "Sophie",
                "last_name": "Visser",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 17,
                "initials": "D.",
                "first_name": "Dirk",
                "last_name": "Bakker",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 18,
                "initials": "P.",
                "first_name": "Piet",
                "last_name": "Jansen",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 19,
                "initials": "A.",
                "first_name": "Annelies",
                "last_name_prefix": "van",
                "last_name": "Loon",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 20,
                "initials": "T.J.",
                "first_name": "Tessa",
                "last_name": "Jansen",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 21,
                "initials": "H.J.",
                "first_name": "Hans",
                "last_name": "Jansen",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 22,
                "initials": "W.J.",
                "first_name": "Willem",
                "last_name": "Janssen",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 23,
                "initials": "B.",
                "first_name": "Bert",
                "last_name": "Meyer",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 24,
                "initials": "M.M.",
                "first_name": "Mieke",
                "last_name": "Meyer",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 25,
                "initials": "J.V.",
                "first_name": "Jan",
                "last_name_prefix": "van",
                "last_name": "Dijk",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 26,
                "initials": "S.D.",
                "first_name": "Suzan",
                "last_name_prefix": "de",
                "last_name": "Wit",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 27,
                "initials": "K.V.",
                "first_name": "Koen",
                "last_name_prefix": "van der",
                "last_name": "Meer",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 28,
                "initials": "L.S.",
                "first_name": "Laura",
                "last_name": "Smit",
                "locality": "Juinen",
                "gender": "Female"
              },
              {
                "number": 29,
                "initials": "F.K.",
                "first_name": "Frank",
                "last_name": "Kool",
                "locality": "Juinen",
                "gender": "Male"
              },
              {
                "number": 30,
                "initials": "C.R.",
                "first_name": "Claudia",
                "last_name": "Reinders",
                "locality": "Juinen",
                "gender": "Female"
              }
            ]
          },
          {
            "number": 2,
            "name": "Political Group B",
            "candidates": [
              {
                "number": 1,
                "initials": "T.",
                "first_name": "Tinus",
                "last_name": "Bakker",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 2,
                "initials": "D.",
                "last_name": "Po",
                "locality": "Test Location",
                "gender": "X"
              },
              {
                "number": 3,
                "initials": "W.",
                "first_name": "Willem",
                "last_name_prefix": "de",
                "last_name": "Vries",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 4,
                "initials": "K.",
                "first_name": "Klaas",
                "last_name": "Kloosterboer",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 5,
                "initials": "L.",
                "first_name": "Liesbeth",
                "last_name": "Jansen",
                "locality": "Test Location",
                "gender": "Female"
              },
              {
                "number": 6,
                "initials": "H.",
                "first_name": "Henk",
                "last_name_prefix": "van den",
                "last_name": "Berg",
                "locality": "Test Location",
                "gender": "Male"
              }
            ]
          }, {
            "number": 3,
            "name": "Political Group C",
            "candidates": [
              {
                "number": 1,
                "initials": "A.",
                "first_name": "Adelbert",
                "last_name_prefix": "van",
                "last_name": "Doorn",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 2,
                "initials": "M.",
                "first_name": "Margriet",
                "last_name_prefix": "van der",
                "last_name": "Linden",
                "locality": "Test Location",
                "gender": "Female"
              },
              {
                "number": 3,
                "initials": "P.",
                "first_name": "Paul",
                "last_name": "Veldkamp",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 4,
                "initials": "S.",
                "first_name": "Sophie",
                "last_name_prefix": "de",
                "last_name": "Groot",
                "locality": "Test Location",
                "gender": "Female"
              },
              {
                "number": 5,
                "initials": "R.",
                "first_name": "Rik",
                "last_name_prefix": "de",
                "last_name": "Ruiter",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 6,
                "initials": "N.",
                "first_name": "Nico",
                "last_name": "Ruiter",
                "locality": "Test Location",
                "gender": "Male"
              }
            ]
          }, {
            "number": 4,
            "name": "Political Group D",
            "candidates": [
              {
                "number": 1,
                "initials": "G.",
                "first_name": "Gerard",
                "last_name": "Bogaert",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 2,
                "initials": "J.",
                "first_name": "Jan",
                "last_name": "Stevens",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 3,
                "initials": "E.",
                "first_name": "Els",
                "last_name": "Groot",
                "locality": "Test Location",
                "gender": "Female"
              },
              {
                "number": 4,
                "initials": "B.",
                "first_name": "Bart",
                "last_name": "Smit",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 5,
                "initials": "F.",
                "first_name": "Frits",
                "last_name": "Veldman",
                "locality": "Test Location",
                "gender": "Male"
              }
            ]
          }, {
            "number": 5,
            "name": "Political Group E",
            "candidates": [
              {
                "number": 1,
                "initials": "G.",
                "first_name": "Gert",
                "last_name": "Smit",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 2,
                "initials": "E.",
                "first_name": "Eva",
                "last_name": "Koster",
                "locality": "Test Location",
                "gender": "Female"
              },
              {
                "number": 3,
                "initials": "L.",
                "first_name": "Leon",
                "last_name": "Hofman",
                "locality": "Test Location",
                "gender": "Male"
              },
              {
                "number": 4,
                "initials": "S.",
                "first_name": "Sophie",
                "last_name": "Visser",
                "locality": "Test Location",
                "gender": "Female"
              }
            ]
          }
        ]');

INSERT INTO committee_sessions (id, number, election_id, status, location, start_date_time, number_of_voters)
VALUES (5, 1, 5, 'data_entry_finished', 'Grote Stad', '2026-03-19 09:15:00', 2000),
       (6, 2, 5, 'data_entry_in_progress', '', NULL, 2000);

INSERT INTO polling_stations (id, committee_session_id, id_prev_session, name, number, number_of_voters, polling_station_type, address,
                              postal_code, locality)
VALUES (8, 5, NULL, 'Testgebouw', 41, NULL, 'FixedLocation', 'Testweg 3', '1234 QA', 'Grote Stad'),
       (9, 6, 8, 'Testgebouw', 41, NULL, 'FixedLocation', 'Testweg 3', '1234 QA', 'Grote Stad'),
       (11, 6, NULL, 'Test ander gebouw', 42, NULL, 'FixedLocation', 'Testweg 4', '1234 QA', 'Grote Stad');

INSERT INTO
    polling_station_investigations
VALUES
    (11, "reason", "findings", 1);

INSERT INTO
    polling_station_data_entries
VALUES
    (
        8,
        5,
        '{"status":"Definitive","state":{"first_entry_user_id":5,"second_entry_user_id":6,"finished_at":"2025-09-16T17:07:31.223365436Z","finalised_with_warnings":false}}',
        '2025-09-16 17:07:31'
    ),
    (
        11,
        6,
        '{"status":"Definitive","state":{"first_entry_user_id":5,"second_entry_user_id":6,"finished_at":"2025-09-16T17:07:31.223365436Z","finalised_with_warnings":false}}',
        '2025-09-16 17:07:31'
    );

INSERT INTO
    polling_station_results
VALUES
    (
        8,
        5,
        '{"model":"CSOFirstSession","extra_investigation":{"extra_investigation_other_reason":{"yes":false,"no":false},"ballots_recounted_extra_investigation":{"yes":false,"no":false}},"counting_differences_polling_station":{"unexplained_difference_ballots_voters":{"yes":false,"no":true},"difference_ballots_per_list":{"yes":false,"no":true}},"voters_counts":{"poll_card_count":1203,"proxy_certificate_count":2,"total_admitted_voters_count":1205},"votes_counts":{"political_group_total_votes":[{"number":1,"total":600},{"number":2,"total":302},{"number":3,"total":98},{"number":4,"total":99},{"number":5,"total":101}],"total_votes_candidates_count":1200,"blank_votes_count":3,"invalid_votes_count":2,"total_votes_cast_count":1205},"differences_counts":{"compare_votes_cast_admitted_voters":{"admitted_voters_equal_votes_cast":true,"votes_cast_greater_than_admitted_voters":false,"votes_cast_smaller_than_admitted_voters":false},"more_ballots_count":0,"fewer_ballots_count":0,"difference_completely_accounted_for":{"yes":false,"no":false}},"political_group_votes":[{"number":1,"total":600,"candidate_votes":[{"number":1,"votes":78},{"number":2,"votes":20},{"number":3,"votes":55},{"number":4,"votes":45},{"number":5,"votes":50},{"number":6,"votes":0},{"number":7,"votes":60},{"number":8,"votes":40},{"number":9,"votes":30},{"number":10,"votes":20},{"number":11,"votes":50},{"number":12,"votes":0},{"number":13,"votes":0},{"number":14,"votes":0},{"number":15,"votes":0},{"number":16,"votes":0},{"number":17,"votes":0},{"number":18,"votes":0},{"number":19,"votes":0},{"number":20,"votes":0},{"number":21,"votes":0},{"number":22,"votes":0},{"number":23,"votes":0},{"number":24,"votes":0},{"number":25,"votes":0},{"number":26,"votes":0},{"number":27,"votes":0},{"number":28,"votes":0},{"number":29,"votes":0},{"number":30,"votes":152}]},{"number":2,"total":302,"candidate_votes":[{"number":1,"votes":150},{"number":2,"votes":50},{"number":3,"votes":22},{"number":4,"votes":10},{"number":5,"votes":30},{"number":6,"votes":40}]},{"number":3,"total":98,"candidate_votes":[{"number":1,"votes":20},{"number":2,"votes":15},{"number":3,"votes":25},{"number":4,"votes":3},{"number":5,"votes":2},{"number":6,"votes":33}]},{"number":4,"total":99,"candidate_votes":[{"number":1,"votes":20},{"number":2,"votes":15},{"number":3,"votes":25},{"number":4,"votes":24},{"number":5,"votes":15}]},{"number":5,"total":101,"candidate_votes":[{"number":1,"votes":20},{"number":2,"votes":31},{"number":3,"votes":10},{"number":4,"votes":40}]}]}',
        '2025-09-16 17:07:31'
    ),
    (
        11,
        6,
        '{"model":"CSONextSession","voters_counts":{"poll_card_count":1203,"proxy_certificate_count":2,"total_admitted_voters_count":1205},"votes_counts":{"political_group_total_votes":[{"number":1,"total":600},{"number":2,"total":302},{"number":3,"total":98},{"number":4,"total":99},{"number":5,"total":101}],"total_votes_candidates_count":1200,"blank_votes_count":3,"invalid_votes_count":2,"total_votes_cast_count":1205},"differences_counts":{"compare_votes_cast_admitted_voters":{"admitted_voters_equal_votes_cast":true,"votes_cast_greater_than_admitted_voters":false,"votes_cast_smaller_than_admitted_voters":false},"more_ballots_count":0,"fewer_ballots_count":0,"difference_completely_accounted_for":{"yes":false,"no":false}},"political_group_votes":[{"number":1,"total":600,"candidate_votes":[{"number":1,"votes":78},{"number":2,"votes":20},{"number":3,"votes":55},{"number":4,"votes":45},{"number":5,"votes":50},{"number":6,"votes":0},{"number":7,"votes":60},{"number":8,"votes":40},{"number":9,"votes":30},{"number":10,"votes":20},{"number":11,"votes":50},{"number":12,"votes":0},{"number":13,"votes":0},{"number":14,"votes":0},{"number":15,"votes":0},{"number":16,"votes":0},{"number":17,"votes":0},{"number":18,"votes":0},{"number":19,"votes":0},{"number":20,"votes":0},{"number":21,"votes":0},{"number":22,"votes":0},{"number":23,"votes":0},{"number":24,"votes":0},{"number":25,"votes":0},{"number":26,"votes":0},{"number":27,"votes":0},{"number":28,"votes":0},{"number":29,"votes":0},{"number":30,"votes":152}]},{"number":2,"total":302,"candidate_votes":[{"number":1,"votes":150},{"number":2,"votes":50},{"number":3,"votes":22},{"number":4,"votes":10},{"number":5,"votes":30},{"number":6,"votes":40}]},{"number":3,"total":98,"candidate_votes":[{"number":1,"votes":20},{"number":2,"votes":15},{"number":3,"votes":25},{"number":4,"votes":3},{"number":5,"votes":2},{"number":6,"votes":33}]},{"number":4,"total":99,"candidate_votes":[{"number":1,"votes":20},{"number":2,"votes":15},{"number":3,"votes":25},{"number":4,"votes":24},{"number":5,"votes":15}]},{"number":5,"total":101,"candidate_votes":[{"number":1,"votes":20},{"number":2,"votes":31},{"number":3,"votes":10},{"number":4,"votes":40}]}]}',
        '2025-09-16 17:07:31'
    );
