1. select ID,name from school.teacher limit 7;
2. select ID,age from school.teacher order by age desc, ID;
3. select ID,age,country from school.teacher where ((age > 50) or (age < 30)) and country in( 'China', 'Canada');
4. select * from school.teacher where name like 'B%'; #不区分大小写,B%表示以B开头的任意字符
5. select ID, length(rtrim(ltrim(name))) as len_name,country from school.teacher;
6. select curdate(), curdate(), dayofweek(curdate());
7. select avg(age), max(age),min(age) from school.teacher where age>30;
8. select distinct age from school.teacher;