# 3.查询男生和女生各多少人。（15分）
SELECT
t_student.sex,
	COUNT( t_student.s_id ) 
FROM
	t_student 
WHERE
	t_student.sex = '男' 
GROUP BY
	t_student.sex
	# 女生各多少人。（15分）
	SELECT
t_student.sex,
	COUNT( t_student.s_id ) 
FROM
	t_student 
WHERE
	t_student.sex = '女' 
GROUP BY
	t_student.sex
	
	
	
	

	
	SELECT
	COUNT(t_student.s_id ) 
FROM
	t_student 
WHERE
	t_student.sex = '女' 
GROUP BY
	t_student.sex / (SELECT count(t_student.s_id) FROM t_student))
	
		
 SELECT count(t_student.s_id) FROM t_student AS coun /SELECT
	COUNT(t_student.s_id ) 
FROM
	t_student 
WHERE
	t_student.sex = '男' 
GROUP BY
	t_student.sex 
	
	
	# 5.查询每门课程下的学生总人数。（15分）
	SELECT t_course.c_name,COUNT(stu_cou.s_id) FROM stu_cou  left join t_course ON t_course.c_id=stu_cou.c_id
	GROUP BY stu_cou.	c_id
	
	
	
	
	
	
	
	
	
	
	