select * from emp where sex='女' and age in(16,17,18);/*查询女性年龄为16,17,18的员工 */
select * from emp where sex='女' and age between 18 and 20 and name like '___' ;/*查询女性年龄为18到20,并且名字为三个字的员工 */
select sex,count(*) from emp where age>18 group by sex;/*统计员工中年龄大于18,男性员工和女性员工的数量 */
select name,age from emp where age<=18 order by age asc,ertrydate desc;/*查询员工中年龄小于等于18员工的姓名和年龄,并对查询结果按年龄升序,如果年龄相同按日期降序 */
select * from emp where sex='男' and age between 16 and 18 order by age,ertrydate desc limit 0,5 ;/*查询员工中年龄为16到18的前五个员工员工,并对查询结果按年龄升序,如果年龄相同按日期降序 */