-
Notifications
You must be signed in to change notification settings - Fork 0
/
CIMINO5.sql
77 lines (67 loc) · 1.89 KB
/
CIMINO5.sql
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
-- UNION DE TABLAS
-- 26
-- select p.Name AS PAIS, c.Name AS CAPITAL
-- FROM country p
-- join city c on p.Code= c.CountryCode
-- where p.Capital = c.ID;
-- 27
-- Select p.Code, c.Name, c.Population
-- from city c
-- join country p on p.Code=c.CountryCode
-- where p.LifeExpectancy > 80;
-- 28
-- select c.Name, p.GovernmentForm
-- from city c
-- join country p on c.CountryCode = p.Code
-- where p.GovernmentForm = 'Federal Republic' and
-- p.Capital=c.ID;
-- 29
-- select l.Language, p.Name
-- from Country p
-- join Countrylanguage l on l.CountryCode= p.Code
-- where p.Population between 1000000 and 3000000
-- group by p.Name;
-- 30
-- select p.Code, p.LocalName, p.Region
-- from country p
-- join countrylanguage l on l.CountryCode= p.Code
-- where l.Language like 'Spanish';
-- 31
-- select p.Name, c.Name
-- from country p
-- join city c on p.code= c.CountryCode
-- where c.Population > p.Population/2 and
-- p.Capital=c.ID;
-- 32
-- select p.Name, p.SurfaceArea
-- from country p
-- join city c on p.code= c.CountryCode
-- where p.Capital=c.ID AND
-- p.Continent like 'Africa' and
-- c.Name=c.District ;
-- 33
-- select p.Name, c.Name, p.IndepYear
-- from country p
-- join city c on p.Code=c.CountryCode
-- where p.IndepYear is not null
-- order by p.IndepYear asc
-- limit 20;
-- 34
-- select c.Name, l.Language
-- from city c
-- join countrylanguage l on c.CountryCode=l.CountryCode
-- join country p on c.CountryCode=p.Code
-- where p.Continent= 'Europe' and
-- l.Language not like 'Spanish' and
-- l.Language not like 'Portuguese'and
-- l.Language not like 'German' and
-- l.Language not like'Italian' and
-- l.Language not like 'French' and
-- l.Language not like 'English';
-- 35
-- select c.Name, p.Name, p.Population
-- from city c
-- join country p on c.CountryCode= p.Code
-- join countrylanguage l on c.CountryCode=l.CountryCode
-- where p.Continent= 'Europe' and l.language like 'English'
-- limit 10;