USE "Gwent - The Witcher Card Game"

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

WHILE @i <= @count
BEGIN

    INSERT INTO CardsOwnership (hPlayer, hCard, nrOfCards, nrOfPremiumCards)   
    VALUES (
        (SELECT hmy FROM Players WHERE name = 'Sif_Great_Wolf'),
    (SELECT hmy FROM Cards
    ORDER BY hmy
    OFFSET @i ROWS   
    FETCH NEXT 1 ROWS ONLY  ),
    0,2
    )
    INSERT INTO CardsOwnership (hPlayer, hCard, nrOfCards, nrOfPremiumCards)   
    VALUES (
        (SELECT hmy FROM Players WHERE name = 'Nik-r'),
    (SELECT hmy FROM Cards
    ORDER BY hmy
    OFFSET @i ROWS   
    FETCH NEXT 1 ROWS ONLY  ),
    0,2
    )
    SET @i = @i + 1;

END

SET @i = 0;
SELECT @count =  Count(*) FROM Cards

WHILE @i <= @count
BEGIN

    INSERT INTO CardsOwnership (hPlayer, hCard, nrOfCards, nrOfPremiumCards)   
    VALUES (
        (SELECT hmy FROM Players WHERE name = 'Daniel.Cujba.54'),
    (SELECT hmy FROM Cards
    ORDER BY hmy
    OFFSET @i ROWS   
    FETCH NEXT 1 ROWS ONLY  ),
    0,2
    )
    INSERT INTO CardsOwnership (hPlayer, hCard, nrOfCards, nrOfPremiumCards)   
    VALUES (
        (SELECT hmy FROM Players WHERE name = 'RaChid-bhk'),
    (SELECT hmy FROM Cards
    ORDER BY hmy
    OFFSET @i ROWS   
    FETCH NEXT 1 ROWS ONLY  ),
    0,2
    )
    SET @i = @i + 30;

END

SET @i = 0;
SELECT @count =  Count(*) FROM Cards

WHILE @i <= @count
BEGIN

    INSERT INTO CardsOwnership (hPlayer, hCard, nrOfCards, nrOfPremiumCards)   
    VALUES (
        (SELECT hmy FROM Players WHERE name = 'lerio2'),
    (SELECT hmy FROM Cards
    ORDER BY hmy
    OFFSET @i ROWS   
    FETCH NEXT 1 ROWS ONLY  ),
    0,2
    )
    INSERT INTO CardsOwnership (hPlayer, hCard, nrOfCards, nrOfPremiumCards)   
    VALUES (
        (SELECT hmy FROM Players WHERE name = 'Mya-Mon369EX'),
    (SELECT hmy FROM Cards
    ORDER BY hmy
    OFFSET @i ROWS   
    FETCH NEXT 1 ROWS ONLY  ),
    0,2
    )
    SET @i = @i + 10;

END