-
Notifications
You must be signed in to change notification settings - Fork 0
/
02_Quiz.txt
44 lines (26 loc) · 912 Bytes
/
02_Quiz.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
1. Select the code which produces this table
SELECT name, population
FROM world
WHERE population BETWEEN 10000000 AND 1250000
2. Pick the result you would obtain from this code:
Table-E
Albania 3200000
Algeria 32900000
3. Select the code which shows the countries that end in A or L
SELECT name FROM world
WHERE name LIKE '%a' OR name LIKE '%1`
4. Pick the result from the query
name length(name)
Italy 5
Malta 5
Spain5 5
5. Here are the first few rows of the world table:
Andorra 936
6. Select the code that would show the countries with an area larger than 50000 and a population smaller than 10000000
SELECT name, area, population
FROM world
WHERE area > 50000 AND population < 1000000
7. Select the code that shows the population density of China, Australia, Nigeria and France
SELECT name, population/area
FROM world
WHERE name IN ('China', 'Nigeria', 'France', 'Australia')