USE "Gwent - The Witcher Card Game"

DECLARE @i INT = 0;
DECLARE @count INT = 0;
SELECT @count =  Count(*) FROM Cosmetics

WHILE @i <= @count
BEGIN

    INSERT INTO CosmeticsOwnership (hPlayer, hCosmetic)   
    VALUES (
        (SELECT hmy FROM Players WHERE name = 'Sif_Great_Wolf'),
    (SELECT hmy FROM Cosmetics
    ORDER BY hmy
    OFFSET @i ROWS   
    FETCH NEXT 1 ROWS ONLY  )
    )
    INSERT INTO CosmeticsOwnership (hPlayer, hCosmetic)   
    VALUES (
        (SELECT hmy FROM Players WHERE name = 'Nik-r'),
    (SELECT hmy FROM Cosmetics
    ORDER BY hmy
    OFFSET @i ROWS   
    FETCH NEXT 1 ROWS ONLY  )
    )
    SET @i = @i + 1;

END

DECLARE @player INT = (SELECT hmy FROM Players WHERE name = 'Daniel.Cujba.54')

INSERT INTO CosmeticsOwnership (hPlayer, hCosmetic)
VALUES (
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Slave Handler')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Duke of Dogs Skin')
)

SET @player = (SELECT hmy FROM Players WHERE name = 'RaChid-bhk')

INSERT INTO CosmeticsOwnership (hPlayer, hCosmetic)
VALUES(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Happy Ciri')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Ciri Nova')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Wild Hunt Pursuit Cardback')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Kitsune')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Skellige Ciri')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Hooded Ciri')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Fire Possession Cardback')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Ciri Kaer Morhen Adept')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Sack Mascote Ciri')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Downsize Ciri')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Purple Portal Animated Border')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Sword Coin')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Cirilla Fiona Elen Riannon')
)

SET @player = (SELECT hmy FROM Players WHERE name = 'lerio2')

INSERT INTO CosmeticsOwnership (hPlayer, hCosmetic)
VALUES(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Happy Ciri')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Ciri Nova')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Wild Hunt Pursuit Cardback')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Kitsune')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Skellige Ciri')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Hooded Ciri')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Fire Possession Cardback')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Ciri Kaer Morhen Adept')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Sack Mascote Ciri')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Downsize Ciri')
)


SET @player = (SELECT hmy FROM Players WHERE name = 'Mya-Mon369EX')

INSERT INTO CosmeticsOwnership (hPlayer, hCosmetic)
VALUES(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'OF LYRIA')
),
(
    @player,
    (SELECT hmy FROM Cosmetics WHERE name = 'Duke of Dogs Skin')
)