-- Step 7: Update odd_selections sport from odd_categories
-- Run in batches to avoid memory issues

-- Check how many need updating
SELECT 'remaining' as info, COUNT(*) FROM odd_selections WHERE sport IS NULL;

-- Batch update (run multiple times until 0 remaining)
UPDATE odd_selections SET sport = oc.sport
FROM odd_categories oc
WHERE odd_selections.odd_category_db_id = oc.db_id
  AND odd_selections.sport IS NULL
LIMIT 5000000;

-- Check remaining
SELECT 'after_batch1' as info, COUNT(*) FROM odd_selections WHERE sport IS NULL;
