学生关系模式tb_student包含学号sno、学生姓名sname、性别sex、年龄age、所在院系dept等字段,要求查询各个院系的男生人数、女生人数,下列查询语句中正确的是( )
A. SELECT dept, sex, COUNT(*) FROM tb_student GROUP BY dept, sex;
B. SELECT sex, COUNT(*) FROM tb_student GROUP BY sex;
C. SELECT dept, COUNT(*) FROM tb_student GROUP BY dept;
D. SELECT dept, sex,SUM(*) FROM tb_student GROUP BY dept, sex;
查看答案
给定员工表tb_emp包含字段eno(职工号)、name(姓名)、age(年龄)、salary(工资)和dept(所在部门),要统计“市场部”的员工人数,正确的语句是( )
A. SELECT dept, COUNT(*) FROM tb_emp GROUP BY dept HAVING dept='市场部';
B. SELECT dept, TOTAL(*)FROM tb_emp GROUP BY dept='市场部';
C. SELECT dept, COUNT(*) FROM tb_emp GROUP BY dept ='市场部';
D. SELECT dept, SUM(*) FROM tb_emp GROUP BY dept HAVING dept='市场部';
多表查询需要设定表间的联接条件。
A. 对
B. 错
连接查询中,使用ON指定两个表的连接字段。
A. 对
B. 错
lesson21 900句听力填空-1(一空一词,默认所有字母都小写)We have encountered _____ __________ _____.Request immediate descent.[音频]