-- Verification queries
-- Check sample assignments were applied correctly

-- Check player 2014
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2014 AND sbaplayer_id = 1336;

-- Check player 2013
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2013 AND sbaplayer_id = 570;

-- Check player 2015
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2015 AND sbaplayer_id = 1571;

-- Check player 2016
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2016 AND sbaplayer_id = 55;

-- Check player 2017
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2017 AND sbaplayer_id = 279;

-- Check player 2018
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2018 AND sbaplayer_id = 892;

-- Check player 2019
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2019 AND sbaplayer_id = 3;

-- Check player 2020
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2020 AND sbaplayer_id = 1433;

-- Check player 2021
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2021 AND sbaplayer_id = 1745;

-- Check player 2022
SELECT id, name, sbaplayer_id 
FROM player 
WHERE id = 2022 AND sbaplayer_id = 49;


-- Summary check: Count of players with non-null sbaplayer_id
SELECT COUNT(*) as players_with_sbaplayer_id 
FROM player 
WHERE sbaplayer_id IS NOT NULL;
-- Expected result: should be close to 12,232

-- Check distribution by assignment source type
SELECT 
    CASE 
        WHEN sbaplayer_id < 3000 THEN 'existing_sbaplayer'
        ELSE 'new_sbaplayer'
    END as assignment_type,
    COUNT(*) as player_count
FROM player 
WHERE sbaplayer_id IS NOT NULL
GROUP BY assignment_type;
