-- 检查教师表中擅长科目字段的数据情况
SELECT 
    id,
    teacher_name,
    real_name,
    subjects,
    audit_status,
    create_time
FROM teacher 
WHERE deleted = 0 
ORDER BY create_time DESC 
LIMIT 10;

-- 检查subjects字段为空的记录数
SELECT 
    COUNT(*) as total_teachers,
    COUNT(CASE WHEN subjects IS NULL OR subjects = '' THEN 1 END) as empty_subjects,
    COUNT(CASE WHEN subjects IS NOT NULL AND subjects != '' THEN 1 END) as has_subjects
FROM teacher 
WHERE deleted = 0;

-- 查看有subjects数据的记录样本
SELECT 
    id,
    teacher_name,
    subjects
FROM teacher 
WHERE deleted = 0 
AND subjects IS NOT NULL 
AND subjects != ''
LIMIT 5;
