begin;
INSERT INTO tournaments 
  (season, tournamentname, country, location, "date", machine, scoringsystem) VALUES (
    (SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
    'Euromix2 serie 06',
    (SELECT country FROM countries WHERE countryname='Norway'),
    'Akers Mic',
    '2002-11-10',
    (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, 'Th0rny' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Th0rny' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   1,
   (SELECT player FROM players WHERE nick='Th0rny'),
   22);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'kjmcw' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'kjmcw' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   2,
   (SELECT player FROM players WHERE nick='kjmcw'),
   19);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Slusk' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Slusk' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   3,
   (SELECT player FROM players WHERE nick='Slusk'),
   17);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Snute' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Snute' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   4,
   (SELECT player FROM players WHERE nick='Snute'),
   15);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Daniil' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Daniil' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   5,
   (SELECT player FROM players WHERE nick='Daniil'),
   13);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Lejordet' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Lejordet' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   6,
   (SELECT player FROM players WHERE nick='Lejordet'),
   11);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Draconia' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Draconia' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   7,
   (SELECT player FROM players WHERE nick='Draconia'),
   9);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Eilin' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Eilin' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   8,
   (SELECT player FROM players WHERE nick='Eilin'),
   8);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Trond' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Trond' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   9,
   (SELECT player FROM players WHERE nick='Trond'),
   7);
INSERT INTO players SELECT nextval('players_player_seq') AS player, 'Fiskelim' AS nick, ( SELECT country FROM countries WHERE countryname='Norway' ) AS country WHERE 'Fiskelim' NOT IN ( SELECT nick FROM players );
INSERT INTO tournamentrankings (tournament, ranking, player, points) VALUES (
   (SELECT tournament FROM tournaments WHERE tournamentname='Euromix2 serie 06' AND season=( SELECT season FROM seasons WHERE seasonname='Euromix 2-serie 2002' )),
   10,
   (SELECT player FROM players WHERE nick='Fiskelim'),
   6);
commit;
