mysql报表统计查询合并成一行的写法 电脑版发表于:2025/4/16 15:02 sql如下: ``` SELECT (select count(*) from cisp_platform_school where `status` = 'active') AS school_count, (select count(*) from cisp_system_users where user_type = 0 and is_active = 1 ) as teacher_count , (select count(*) from cisp_system_users where user_type = 1 and is_active = 1) as student_count, (select count(*) from cisp_case_lib where is_active = 1 ) as caselib_count; ) ```