开始进行SQL
的练习,选择了sqlzoo网站
表结构
练习题
主要是练习where
语句的使用
1 | -- 1 |
quiz
- 产生下表的结果
1 | select name, population |
- 通配符使用
1 | select name, population |
- Select the code which shows the countries that end in A or L
1 | select name |
- 代码运行结果
1 | select name, length(name) |
- 代码运行结果
1 | select name, area*2 |
- Select the code that would show the countries with an area larger than 50000 and a population smaller than 10000000
1 | select name, area, population |
- Select the code that shows the population density of China, Australia, Nigeria and France
笔记:题目中要求的是人口密度
1 | select name, population / area |