begin;
INSERT INTO tournaments 
  (season, tournamentname, country, location, "date", machine, scoringsystem) VALUES (
    (SELECT season FROM seasons WHERE seasonname='Beginner' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
    'Trondheimsturnering',
    (SELECT country FROM countries WHERE countryname='Norway'),
    'Megazone Trondheim',
    '2004-04-23',
    (SELECT machine FROM machines WHERE machinename='Dancing Stage EuroMix 2'),
    (SELECT scoringsystem FROM scoringsystems WHERE scoringsystemname='10K Machine score')
);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Morbuz' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Morbuz' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1,
   (SELECT player FROM players WHERE nick='Morbuz'),
   NULL);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Koala_Man' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Koala_Man' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   NULL);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Knuta' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Knuta' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   3,
   (SELECT player FROM players WHERE nick='Knuta'),
   NULL);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Danner' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Danner' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   4,
   (SELECT player FROM players WHERE nick='Danner'),
   NULL);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 1);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 1,
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love (SPEED MIX)'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=1;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 1,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 1,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love (SPEED MIX)')),
   'f',
   1635);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 1,
   (SELECT player FROM players WHERE nick='Morbuz'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 1,
   (SELECT player FROM players WHERE nick='Morbuz'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Can\'t Stop Fallin\' in Love (SPEED MIX)')),
   'f',
   1370);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 2);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 2,
   (SELECT song FROM songs WHERE lower(title)=lower('End of the Century'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=1;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 2,
   (SELECT player FROM players WHERE nick='Knuta'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 2,
   (SELECT player FROM players WHERE nick='Knuta'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('End of the Century')),
   'f',
   2084);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 2,
   (SELECT player FROM players WHERE nick='Danner'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 2,
   (SELECT player FROM players WHERE nick='Danner'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('End of the Century')),
   'f',
   1684);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 3);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 3,
   (SELECT song FROM songs WHERE lower(title)=lower('B4U'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=1;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 3,
   (SELECT player FROM players WHERE nick='Danner'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 3,
   (SELECT player FROM players WHERE nick='Danner'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('B4U')),
   'f',
   1967);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 3,
   (SELECT player FROM players WHERE nick='Morbuz'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 3,
   (SELECT player FROM players WHERE nick='Morbuz'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('B4U')),
   'f',
   2293);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 4);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 4,
   (SELECT song FROM songs WHERE lower(title)=lower('5, 6, 7, 8'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=1;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 4,
   (SELECT player FROM players WHERE nick='Knuta'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 4,
   (SELECT player FROM players WHERE nick='Knuta'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('5, 6, 7, 8')),
   'f',
   56);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 4,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 4,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('5, 6, 7, 8')),
   'f',
   2444);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 5);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 5,
   (SELECT song FROM songs WHERE lower(title)=lower('Hypnotic Crisis'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=1;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 5,
   (SELECT player FROM players WHERE nick='Knuta'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 5,
   (SELECT player FROM players WHERE nick='Knuta'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Hypnotic Crisis')),
   'f',
   1400);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 5,
   (SELECT player FROM players WHERE nick='Morbuz'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 5,
   (SELECT player FROM players WHERE nick='Morbuz'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Hypnotic Crisis')),
   'f',
   1591);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 6);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 6,
   (SELECT song FROM songs WHERE lower(title)=lower('Burnin\' the Floor'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=1;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 6,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 6,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Burnin\' the Floor')),
   'f',
   2988);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 6,
   (SELECT player FROM players WHERE nick='Danner'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   1, 6,
   (SELECT player FROM players WHERE nick='Danner'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Burnin\' the Floor')),
   'f',
   59);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 1);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 1,
   (SELECT song FROM songs WHERE lower(title)=lower('Groove 2001'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=2;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 1,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 1,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Groove 2001')),
   'f',
   1268);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 1,
   (SELECT player FROM players WHERE nick='Morbuz'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 1,
   (SELECT player FROM players WHERE nick='Morbuz'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Groove 2001')),
   'f',
   1962);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 2);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 2,
   (SELECT song FROM songs WHERE lower(title)=lower('Exotic Ethnic'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=2;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 2,
   (SELECT player FROM players WHERE nick='Knuta'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 2,
   (SELECT player FROM players WHERE nick='Knuta'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Exotic Ethnic')),
   'f',
   2132);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 2,
   (SELECT player FROM players WHERE nick='Danner'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 2,
   (SELECT player FROM players WHERE nick='Danner'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Exotic Ethnic')),
   'f',
   2038);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 3);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 3,
   (SELECT song FROM songs WHERE lower(title)=lower('Look to the sky'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=2;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 3,
   (SELECT player FROM players WHERE nick='Danner'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 3,
   (SELECT player FROM players WHERE nick='Danner'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Look to the sky')),
   'f',
   1654);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 3,
   (SELECT player FROM players WHERE nick='Morbuz'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 3,
   (SELECT player FROM players WHERE nick='Morbuz'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Look to the sky')),
   'f',
   1827);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 4);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 4,
   (SELECT song FROM songs WHERE lower(title)=lower('Healing Vision (Angelic Mix)'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=2;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 4,
   (SELECT player FROM players WHERE nick='Knuta'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 4,
   (SELECT player FROM players WHERE nick='Knuta'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Healing Vision (Angelic Mix)')),
   'f',
   2195);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 4,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 4,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('Healing Vision (Angelic Mix)')),
   'f',
   2542);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 5);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 5,
   (SELECT song FROM songs WHERE lower(title)=lower('That was then, This is now'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=2;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 5,
   (SELECT player FROM players WHERE nick='Knuta'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 5,
   (SELECT player FROM players WHERE nick='Knuta'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('That was then, This is now')),
   'f',
   1728);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 5,
   (SELECT player FROM players WHERE nick='Morbuz'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 5,
   (SELECT player FROM players WHERE nick='Morbuz'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('That was then, This is now')),
   'f',
   2158);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 6);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 6,
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me'))
);
UPDATE rounds SET randomsongs=1 WHERE 
  tournament=(SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=2;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 6,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 6,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me')),
   'f',
   1242);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 6,
   (SELECT player FROM players WHERE nick='Danner'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   2, 6,
   (SELECT player FROM players WHERE nick='Danner'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('I Want You To Want Me')),
   'f',
   896);
INSERT INTO rounds (tournament, round, randomsongs, chosensongs) 
  VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   3,
   0, 0);
INSERT INTO groups (tournament, round, parallel) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   3, 0);
INSERT INTO roundrandomsongs (tournament, round, parallel, song) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   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 tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )) AND 
  round=3;
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   3, 0,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   1
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   3, 0,
   (SELECT player FROM players WHERE nick='Koala_Man'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   1902);
INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   3, 0,
   (SELECT player FROM players WHERE nick='Morbuz'),
   2
);
INSERT INTO scores (tournament, round, parallel, player, songnumber, song, chosen, score) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Trondheimsturnering' AND season=( SELECT season FROM seasons WHERE seasonname='Beginner' )),
   3, 0,
   (SELECT player FROM players WHERE nick='Morbuz'),
   0,
   (SELECT song FROM songs WHERE lower(title)=lower('The Centre of the Heart (Stonebridge Club Mix)')),
   'f',
   2069);
commit;
