=== COMPREHENSIVE COURSE ANALYSIS === 1. COURSES STATUS: Total courses (with trashed): 990 Courses with category_id: 990 Courses with NULL category_id: 0 2. CATEGORIES: Total categories: 736 3. COURSE-CATEGORY RELATIONSHIPS: Courses with VALID category_id: 990 Courses with INVALID category_id: 0 Courses with NULL category_id: 0 4. MATH CHECK: Valid + Invalid + NULL = 990 (should equal 990) 5. COURSES REACHABLE BY CATEGORY RELATIONSHIPS: Courses found via category relationships: 990 === SUMMARY === ✓ Courses with valid categories: 990 ✗ Courses with invalid categories (orphaned): 0 ✗ Courses with NULL category: 0 Total orphaned + NULL: 0