-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathq5.sql
More file actions
executable file
·51 lines (42 loc) · 715 Bytes
/
Copy pathq5.sql
File metadata and controls
executable file
·51 lines (42 loc) · 715 Bytes
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
43
44
45
46
47
48
49
50
51
#SUM and COUNT
#Question 1
SELECT SUM(population)
FROM world;
#Question 2
SELECT DISTINCT continent
FROM world;
#Question 3
SELECT SUM(gdp)
FROM world
WHERE continent = 'Africa';
#Question 4
SELECT COUNT(name)
FROM world
WHERE area >= 1000000;
#Question 5
SELECT SUM(population)
FROM world
WHERE name IN ('Estonia', 'Latvia', 'Lithuania');
#Question 6
SELECT continent, COUNT(name)
FROM world
GROUP BY continent;
#Question 7
SELECT continent, COUNT(name)
FROM world
WHERE population >= 10000000
GROUP BY continent;
#Question 8
SELECT continent
FROM world
GROUP BY continent
HAVING SUM(population) >= 100000000;
#Quiz
1. C
2. A
3. D
4. E
5. B
6. E
7. D
8. D