begin;
INSERT INTO tournaments 
  (season, name, country, location, "date", machine, scoringsystem) VALUES (
    (SELECT season FROM seasons WHERE name='Challenge Cup 2004'),
    'Challenge Cup 7',
    (SELECT country FROM countries WHERE name='Norway'),
    'Tønsberg - Sjøsenteret bowling',
    '2004-11-21',
    (SELECT machine FROM machines WHERE name='Dancing Stage EuroMix 2'),
    (SELECT scoringsystem FROM scoringsystems WHERE name='10K Machine score')
);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT song FROM songs WHERE lower(title)=lower('Let the Beat Hit \'em!'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Crienexzy' AS nick WHERE 'Crienexzy' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Crienexzy'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Crienexzy'),
   (SELECT song FROM songs WHERE lower(title)=lower('Let the Beat Hit \'em!')),
   'f',
   5584);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Crienexzy'),
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me')),
   'f',
   4702);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Tove' AS nick WHERE 'Tove' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Tove'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Tove'),
   (SELECT song FROM songs WHERE lower(title)=lower('Let the Beat Hit \'em!')),
   'f',
   4854);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Tove'),
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me')),
   'f',
   4742);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'JonAnders' AS nick WHERE 'JonAnders' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='JonAnders'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='JonAnders'),
   (SELECT song FROM songs WHERE lower(title)=lower('Let the Beat Hit \'em!')),
   'f',
   5596);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='JonAnders'),
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me')),
   'f',
   3874);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Andeplane' AS nick WHERE 'Andeplane' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Andeplane'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Andeplane'),
   (SELECT song FROM songs WHERE lower(title)=lower('Let the Beat Hit \'em!')),
   'f',
   6008);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Andeplane'),
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me')),
   'f',
   4778);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Matsi' AS nick WHERE 'Matsi' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Matsi'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Matsi'),
   (SELECT song FROM songs WHERE lower(title)=lower('Let the Beat Hit \'em!')),
   'f',
   5523);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Matsi'),
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me')),
   'f',
   5217);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snofox' AS nick WHERE 'Snofox' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Snofox'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Snofox'),
   (SELECT song FROM songs WHERE lower(title)=lower('Let the Beat Hit \'em!')),
   'f',
   6511);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='Snofox'),
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me')),
   'f',
   5597);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'T|na' AS nick WHERE 'T|na' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='T|na'),
   7
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='T|na'),
   (SELECT song FROM songs WHERE lower(title)=lower('Let the Beat Hit \'em!')),
   'f',
   6435);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 1,
   (SELECT player FROM players WHERE nick='T|na'),
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me')),
   'f',
   5090);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova Primeval'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT song FROM songs WHERE lower(title)=lower('Paranoia KCET (Clean Mix)'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'uSimen' AS nick WHERE 'uSimen' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='uSimen'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='uSimen'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova Primeval')),
   'f',
   5520);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='uSimen'),
   (SELECT song FROM songs WHERE lower(title)=lower('Paranoia KCET (Clean Mix)')),
   'f',
   6691);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Pfxp' AS nick WHERE 'Pfxp' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Pfxp'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Pfxp'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova Primeval')),
   'f',
   5958);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Pfxp'),
   (SELECT song FROM songs WHERE lower(title)=lower('Paranoia KCET (Clean Mix)')),
   'f',
   7853);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Glock' AS nick WHERE 'Glock' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Glock'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Glock'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova Primeval')),
   'f',
   4185);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Glock'),
   (SELECT song FROM songs WHERE lower(title)=lower('Paranoia KCET (Clean Mix)')),
   'f',
   6679);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Eruanna' AS nick WHERE 'Eruanna' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Eruanna'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Eruanna'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova Primeval')),
   'f',
   4341);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Eruanna'),
   (SELECT song FROM songs WHERE lower(title)=lower('Paranoia KCET (Clean Mix)')),
   'f',
   7410);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'v|per' AS nick WHERE 'v|per' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='v|per'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='v|per'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova Primeval')),
   'f',
   6649);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='v|per'),
   (SELECT song FROM songs WHERE lower(title)=lower('Paranoia KCET (Clean Mix)')),
   'f',
   7443);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Daniil' AS nick WHERE 'Daniil' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Daniil'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Daniil'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova Primeval')),
   'f',
   7830);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Daniil'),
   (SELECT song FROM songs WHERE lower(title)=lower('Paranoia KCET (Clean Mix)')),
   'f',
   8431);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Nameless' AS nick WHERE 'Nameless' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Nameless'),
   7
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Nameless'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova Primeval')),
   'f',
   8724);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 2,
   (SELECT player FROM players WHERE nick='Nameless'),
   (SELECT song FROM songs WHERE lower(title)=lower('Paranoia KCET (Clean Mix)')),
   'f',
   8731);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT song FROM songs WHERE lower(title)=lower('Spin the disc'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT song FROM songs WHERE lower(title)=lower('Living in America'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Benny' AS nick WHERE 'Benny' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Benny'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Benny'),
   (SELECT song FROM songs WHERE lower(title)=lower('Spin the disc')),
   'f',
   6069);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Benny'),
   (SELECT song FROM songs WHERE lower(title)=lower('Living in America')),
   'f',
   5138);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Volstad' AS nick WHERE 'Volstad' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Volstad'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Volstad'),
   (SELECT song FROM songs WHERE lower(title)=lower('Spin the disc')),
   'f',
   6326);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Volstad'),
   (SELECT song FROM songs WHERE lower(title)=lower('Living in America')),
   'f',
   5502);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Annkakri' AS nick WHERE 'Annkakri' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Annkakri'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Annkakri'),
   (SELECT song FROM songs WHERE lower(title)=lower('Spin the disc')),
   'f',
   4418);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Annkakri'),
   (SELECT song FROM songs WHERE lower(title)=lower('Living in America')),
   'f',
   4148);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Athena' AS nick WHERE 'Athena' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Athena'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Athena'),
   (SELECT song FROM songs WHERE lower(title)=lower('Spin the disc')),
   'f',
   6783);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Athena'),
   (SELECT song FROM songs WHERE lower(title)=lower('Living in America')),
   'f',
   5119);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Felz' AS nick WHERE 'Felz' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Felz'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Felz'),
   (SELECT song FROM songs WHERE lower(title)=lower('Spin the disc')),
   'f',
   7297);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Felz'),
   (SELECT song FROM songs WHERE lower(title)=lower('Living in America')),
   'f',
   6030);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Ylini' AS nick WHERE 'Ylini' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Ylini'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Ylini'),
   (SELECT song FROM songs WHERE lower(title)=lower('Spin the disc')),
   'f',
   7471);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Ylini'),
   (SELECT song FROM songs WHERE lower(title)=lower('Living in America')),
   'f',
   6230);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Oliyzia' AS nick WHERE 'Oliyzia' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   7
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   (SELECT song FROM songs WHERE lower(title)=lower('Spin the disc')),
   'f',
   7854);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 3,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   (SELECT song FROM songs WHERE lower(title)=lower('Living in America')),
   'f',
   6684);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT song FROM songs WHERE lower(title)=lower('The Reflex'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Voffen' AS nick WHERE 'Voffen' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Voffen'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Voffen'),
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love')),
   'f',
   3516);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Voffen'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Reflex')),
   'f',
   3154);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Zackie' AS nick WHERE 'Zackie' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Zackie'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Zackie'),
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love')),
   'f',
   6260);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Zackie'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Reflex')),
   'f',
   4965);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Zeila' AS nick WHERE 'Zeila' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Zeila'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Zeila'),
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love')),
   'f',
   6582);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Zeila'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Reflex')),
   'f',
   6357);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Alexxz' AS nick WHERE 'Alexxz' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Alexxz'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Alexxz'),
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love')),
   'f',
   7079);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Alexxz'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Reflex')),
   'f',
   6790);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Olemann' AS nick WHERE 'Olemann' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Olemann'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Olemann'),
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love')),
   'f',
   7219);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='Olemann'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Reflex')),
   'f',
   6300);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'RiChY' AS nick WHERE 'RiChY' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='RiChY'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='RiChY'),
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love')),
   'f',
   7680);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 4,
   (SELECT player FROM players WHERE nick='RiChY'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Reflex')),
   'f',
   6996);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT song FROM songs WHERE lower(title)=lower('The Vibe is Right'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT song FROM songs WHERE lower(title)=lower('Stomp'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'SLC' AS nick WHERE 'SLC' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='SLC'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='SLC'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Vibe is Right')),
   'f',
   5267);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='SLC'),
   (SELECT song FROM songs WHERE lower(title)=lower('Stomp')),
   'f',
   5382);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Matti' AS nick WHERE 'Matti' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Matti'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Matti'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Vibe is Right')),
   'f',
   5707);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Matti'),
   (SELECT song FROM songs WHERE lower(title)=lower('Stomp')),
   'f',
   4999);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Hyper' AS nick WHERE 'Hyper' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Hyper'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Hyper'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Vibe is Right')),
   'f',
   4604);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Hyper'),
   (SELECT song FROM songs WHERE lower(title)=lower('Stomp')),
   'f',
   4909);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Mync' AS nick WHERE 'Mync' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Mync'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Mync'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Vibe is Right')),
   'f',
   5602);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Mync'),
   (SELECT song FROM songs WHERE lower(title)=lower('Stomp')),
   'f',
   5644);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Duckling' AS nick WHERE 'Duckling' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Duckling'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Duckling'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Vibe is Right')),
   'f',
   5867);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Duckling'),
   (SELECT song FROM songs WHERE lower(title)=lower('Stomp')),
   'f',
   5728);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Haggar' AS nick WHERE 'Haggar' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Haggar'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Vibe is Right')),
   'f',
   6375);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 5,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('Stomp')),
   'f',
   6569);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT song FROM songs WHERE lower(title)=lower('Jam Jam Reggae (AM Swing Mix)'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Dritago' AS nick WHERE 'Dritago' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Dritago'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Dritago'),
   (SELECT song FROM songs WHERE lower(title)=lower('Jam Jam Reggae (AM Swing Mix)')),
   'f',
   7445);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Dritago'),
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)')),
   'f',
   6566);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Pyro' AS nick WHERE 'Pyro' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Pyro'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Pyro'),
   (SELECT song FROM songs WHERE lower(title)=lower('Jam Jam Reggae (AM Swing Mix)')),
   'f',
   7026);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Pyro'),
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)')),
   'f',
   5519);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Marilla' AS nick WHERE 'Marilla' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Marilla'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Marilla'),
   (SELECT song FROM songs WHERE lower(title)=lower('Jam Jam Reggae (AM Swing Mix)')),
   'f',
   6970);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Marilla'),
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)')),
   'f',
   5783);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Pingo' AS nick WHERE 'Pingo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Pingo'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Pingo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Jam Jam Reggae (AM Swing Mix)')),
   'f',
   7202);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Pingo'),
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)')),
   'f',
   6666);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Bonzo' AS nick WHERE 'Bonzo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Bonzo'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Bonzo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Jam Jam Reggae (AM Swing Mix)')),
   'f',
   7537);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='Bonzo'),
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)')),
   'f',
   6450);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'OJK' AS nick WHERE 'OJK' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='OJK'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='OJK'),
   (SELECT song FROM songs WHERE lower(title)=lower('Jam Jam Reggae (AM Swing Mix)')),
   'f',
   7612);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 6,
   (SELECT player FROM players WHERE nick='OJK'),
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)')),
   'f',
   6822);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT song FROM songs WHERE lower(title)=lower('Dynamite Rave'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT song FROM songs WHERE lower(title)=lower('Rain of Sorrow'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=1;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Indy' AS nick WHERE 'Indy' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Indy'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Indy'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dynamite Rave')),
   'f',
   4984);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Indy'),
   (SELECT song FROM songs WHERE lower(title)=lower('Rain of Sorrow')),
   'f',
   4764);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Electron' AS nick WHERE 'Electron' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Electron'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Electron'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dynamite Rave')),
   'f',
   6998);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Electron'),
   (SELECT song FROM songs WHERE lower(title)=lower('Rain of Sorrow')),
   'f',
   6599);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Bush' AS nick WHERE 'Bush' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Bush'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Bush'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dynamite Rave')),
   'f',
   5022);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Bush'),
   (SELECT song FROM songs WHERE lower(title)=lower('Rain of Sorrow')),
   'f',
   3527);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Gogo' AS nick WHERE 'Gogo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Gogo'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Gogo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dynamite Rave')),
   'f',
   8367);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Gogo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Rain of Sorrow')),
   'f',
   7439);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Smiph' AS nick WHERE 'Smiph' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Smiph'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Smiph'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dynamite Rave')),
   'f',
   7428);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Smiph'),
   (SELECT song FROM songs WHERE lower(title)=lower('Rain of Sorrow')),
   'f',
   6726);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snute' AS nick WHERE 'Snute' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Snute'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dynamite Rave')),
   'f',
   8429);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   1, 7,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('Rain of Sorrow')),
   'f',
   8532);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT song FROM songs WHERE lower(title)=lower('Test My Best'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT song FROM songs WHERE lower(title)=lower('Love You Like A Fool'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=2;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=2;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'v|per' AS nick WHERE 'v|per' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='v|per'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='v|per'),
   (SELECT song FROM songs WHERE lower(title)=lower('Test My Best')),
   'f',
   5504);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='v|per'),
   (SELECT song FROM songs WHERE lower(title)=lower('Love You Like A Fool')),
   'f',
   5609);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Mync' AS nick WHERE 'Mync' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Mync'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Mync'),
   (SELECT song FROM songs WHERE lower(title)=lower('Test My Best')),
   'f',
   6179);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Mync'),
   (SELECT song FROM songs WHERE lower(title)=lower('Love You Like A Fool')),
   'f',
   6075);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Duckling' AS nick WHERE 'Duckling' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Duckling'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Duckling'),
   (SELECT song FROM songs WHERE lower(title)=lower('Test My Best')),
   'f',
   6417);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Duckling'),
   (SELECT song FROM songs WHERE lower(title)=lower('Love You Like A Fool')),
   'f',
   6355);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'T|na' AS nick WHERE 'T|na' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='T|na'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='T|na'),
   (SELECT song FROM songs WHERE lower(title)=lower('Test My Best')),
   'f',
   6640);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='T|na'),
   (SELECT song FROM songs WHERE lower(title)=lower('Love You Like A Fool')),
   'f',
   6515);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Pingo' AS nick WHERE 'Pingo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Pingo'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Pingo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Test My Best')),
   'f',
   6630);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Pingo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Love You Like A Fool')),
   'f',
   6243);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Haggar' AS nick WHERE 'Haggar' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Haggar'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('Test My Best')),
   'f',
   6730);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('Love You Like A Fool')),
   'f',
   6719);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'OJK' AS nick WHERE 'OJK' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='OJK'),
   7
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='OJK'),
   (SELECT song FROM songs WHERE lower(title)=lower('Test My Best')),
   'f',
   6697);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 1,
   (SELECT player FROM players WHERE nick='OJK'),
   (SELECT song FROM songs WHERE lower(title)=lower('Love You Like A Fool')),
   'f',
   6758);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT song FROM songs WHERE lower(title)=lower('Trip Machine (Luv Mix)'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=2;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=2;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Alexxz' AS nick WHERE 'Alexxz' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Alexxz'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Alexxz'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6175);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Alexxz'),
   (SELECT song FROM songs WHERE lower(title)=lower('Trip Machine (Luv Mix)')),
   'f',
   6752);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Smiph' AS nick WHERE 'Smiph' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Smiph'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Smiph'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   5951);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Smiph'),
   (SELECT song FROM songs WHERE lower(title)=lower('Trip Machine (Luv Mix)')),
   'f',
   6669);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Ylini' AS nick WHERE 'Ylini' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Ylini'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Ylini'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6003);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Ylini'),
   (SELECT song FROM songs WHERE lower(title)=lower('Trip Machine (Luv Mix)')),
   'f',
   7353);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Gogo' AS nick WHERE 'Gogo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Gogo'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Gogo'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6792);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Gogo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Trip Machine (Luv Mix)')),
   'f',
   6897);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Oliyzia' AS nick WHERE 'Oliyzia' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6704);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   (SELECT song FROM songs WHERE lower(title)=lower('Trip Machine (Luv Mix)')),
   'f',
   8140);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'RiChY' AS nick WHERE 'RiChY' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='RiChY'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='RiChY'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6455);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='RiChY'),
   (SELECT song FROM songs WHERE lower(title)=lower('Trip Machine (Luv Mix)')),
   'f',
   7779);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snute' AS nick WHERE 'Snute' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Snute'),
   7
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6606);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 2,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('Trip Machine (Luv Mix)')),
   'f',
   8683);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT song FROM songs WHERE lower(title)=lower('So Deep (Perfect Sphere Mix)'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=2;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=2;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Felz' AS nick WHERE 'Felz' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Felz'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Felz'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova')),
   'f',
   7472);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Felz'),
   (SELECT song FROM songs WHERE lower(title)=lower('So Deep (Perfect Sphere Mix)')),
   'f',
   6843);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Andeplane' AS nick WHERE 'Andeplane' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Andeplane'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Andeplane'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova')),
   'f',
   8100);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Andeplane'),
   (SELECT song FROM songs WHERE lower(title)=lower('So Deep (Perfect Sphere Mix)')),
   'f',
   6651);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Bonzo' AS nick WHERE 'Bonzo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Bonzo'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Bonzo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova')),
   'f',
   8294);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Bonzo'),
   (SELECT song FROM songs WHERE lower(title)=lower('So Deep (Perfect Sphere Mix)')),
   'f',
   8144);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Daniil' AS nick WHERE 'Daniil' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Daniil'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Daniil'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova')),
   'f',
   7415);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Daniil'),
   (SELECT song FROM songs WHERE lower(title)=lower('So Deep (Perfect Sphere Mix)')),
   'f',
   6458);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Olemann' AS nick WHERE 'Olemann' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Olemann'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Olemann'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova')),
   'f',
   7732);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Olemann'),
   (SELECT song FROM songs WHERE lower(title)=lower('So Deep (Perfect Sphere Mix)')),
   'f',
   7534);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snofox' AS nick WHERE 'Snofox' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Snofox'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Snofox'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova')),
   'f',
   8004);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Snofox'),
   (SELECT song FROM songs WHERE lower(title)=lower('So Deep (Perfect Sphere Mix)')),
   'f',
   8351);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Nameless' AS nick WHERE 'Nameless' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Nameless'),
   7
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Nameless'),
   (SELECT song FROM songs WHERE lower(title)=lower('Afronova')),
   'f',
   8352);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   2, 3,
   (SELECT player FROM players WHERE nick='Nameless'),
   (SELECT song FROM songs WHERE lower(title)=lower('So Deep (Perfect Sphere Mix)')),
   'f',
   8506);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=3;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=3;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'RiChY' AS nick WHERE 'RiChY' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='RiChY'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='RiChY'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6592);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snofox' AS nick WHERE 'Snofox' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Snofox'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Snofox'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6798);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Pingo' AS nick WHERE 'Pingo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Pingo'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Pingo'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6281);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'OJK' AS nick WHERE 'OJK' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='OJK'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='OJK'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6681);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Oliyzia' AS nick WHERE 'Oliyzia' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6873);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Bonzo' AS nick WHERE 'Bonzo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Bonzo'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Bonzo'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6497);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snute' AS nick WHERE 'Snute' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   7
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6778);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Nameless' AS nick WHERE 'Nameless' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   8
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6637);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Haggar' AS nick WHERE 'Haggar' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   9
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   3, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   6667);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT song FROM songs WHERE lower(title)=lower('Aaron\'s Party (Come Get It)'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=4;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=4;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Nameless' AS nick WHERE 'Nameless' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   (SELECT song FROM songs WHERE lower(title)=lower('Aaron\'s Party (Come Get It)')),
   'f',
   7190);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'RiChY' AS nick WHERE 'RiChY' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='RiChY'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='RiChY'),
   (SELECT song FROM songs WHERE lower(title)=lower('Aaron\'s Party (Come Get It)')),
   'f',
   6818);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Oliyzia' AS nick WHERE 'Oliyzia' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Oliyzia'),
   (SELECT song FROM songs WHERE lower(title)=lower('Aaron\'s Party (Come Get It)')),
   'f',
   7492);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snofox' AS nick WHERE 'Snofox' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Snofox'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Snofox'),
   (SELECT song FROM songs WHERE lower(title)=lower('Aaron\'s Party (Come Get It)')),
   'f',
   7135);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snute' AS nick WHERE 'Snute' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('Aaron\'s Party (Come Get It)')),
   'f',
   7539);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Haggar' AS nick WHERE 'Haggar' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   6
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('Aaron\'s Party (Come Get It)')),
   'f',
   7486);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Bonzo' AS nick WHERE 'Bonzo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Bonzo'),
   7
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   4, 0,
   (SELECT player FROM players WHERE nick='Bonzo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Aaron\'s Party (Come Get It)')),
   'f',
   7116);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT song FROM songs WHERE lower(title)=lower('Remember You'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=5;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=5;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Bonzo' AS nick WHERE 'Bonzo' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Bonzo'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Bonzo'),
   (SELECT song FROM songs WHERE lower(title)=lower('Remember You')),
   'f',
   4624);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Nameless' AS nick WHERE 'Nameless' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   (SELECT song FROM songs WHERE lower(title)=lower('Remember You')),
   'f',
   4707);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snofox' AS nick WHERE 'Snofox' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Snofox'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Snofox'),
   (SELECT song FROM songs WHERE lower(title)=lower('Remember You')),
   'f',
   4620);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Haggar' AS nick WHERE 'Haggar' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('Remember You')),
   'f',
   4811);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snute' AS nick WHERE 'Snute' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   5
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   5, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('Remember You')),
   'f',
   4891);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0,
   (SELECT song FROM songs WHERE lower(title)=lower('Dead End'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=6;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=6;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snofox' AS nick WHERE 'Snofox' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0,
   (SELECT player FROM players WHERE nick='Snofox'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0,
   (SELECT player FROM players WHERE nick='Snofox'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dead End')),
   'f',
   8290);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Haggar' AS nick WHERE 'Haggar' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dead End')),
   'f',
   8621);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Nameless' AS nick WHERE 'Nameless' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dead End')),
   'f',
   8421);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snute' AS nick WHERE 'Snute' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   4
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   6, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('Dead End')),
   'f',
   8756);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   7,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   7, 0);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   7, 0,
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=7;
UPDATE rounds SET chosensongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=7;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Nameless' AS nick WHERE 'Nameless' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   7, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   7, 0,
   (SELECT player FROM players WHERE nick='Nameless'),
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)')),
   'f',
   6705);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Haggar' AS nick WHERE 'Haggar' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   7, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   7, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)')),
   'f',
   6855);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snute' AS nick WHERE 'Snute' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   7, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   3
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   7, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('www.blonde girl (MOMO Mix)')),
   'f',
   6863);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8, 0);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8, 0,
   (SELECT song FROM songs WHERE lower(title)=lower('B4U'))
);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8, 0,
   (SELECT song FROM songs WHERE lower(title)=lower('Max 300'))
);
UPDATE rounds SET randomsongs=2 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE name='Challenge Cup 7') AND 
  round=8;
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Haggar' AS nick WHERE 'Haggar' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('B4U')),
   'f',
   7821);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8, 0,
   (SELECT player FROM players WHERE nick='Haggar'),
   (SELECT song FROM songs WHERE lower(title)=lower('Max 300')),
   'f',
   9608);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snute' AS nick WHERE 'Snute' NOT IN ( SELECT nick FROM players );
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('B4U')),
   'f',
   7845);
INSERT INTO scores (tournament, round, parallel, player, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE name='Challenge Cup 7'),
   8, 0,
   (SELECT player FROM players WHERE nick='Snute'),
   (SELECT song FROM songs WHERE lower(title)=lower('Max 300')),
   'f',
   9578);
commit;
