-
Notifications
You must be signed in to change notification settings - Fork 0
/
Proposition.txt
97 lines (70 loc) · 1.51 KB
/
Proposition.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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Q2.
SELECT nom
FROM brasseries
SELECT COUNT(*)
FROM brasseries
Q3. (a)
SELECT *
FROM bieres
JOIN brasseries
ON bieres.id_brasserie=brasseries.id
WHERE pays='Belgium'
Q3. (b)
SELECT *
FROM bieres
JOIN brasseries
ON bieres.id_brasserie=brasseries.id
WHERE pays='Belgium' AND abv>=7
Q4.
SELECT nom, pays
FROM brasseries
GROUP BY nom
Q5.
SELECT nom, pays
FROM brasseries
WHERE pays='Germany' OR pays='Belgium'
SELECT nom, pays, address1 AS 'Adresse de la brasserie'
FROM brasseries
WHERE pays='Germany' OR pays='Belgium'
Q6.
SELECT COUNT(*), pays
FROM brasseries
GROUP BY pays
SELECT COUNT(*), pays
FROM brasseries
GROUP BY pays
ORDER BY COUNT(*)
Q7.
SELECT nom, address1, telephone
FROM brasseries
WHERE ville='Esquelbecq'
Q8.
SELECT bieres.nom AS 'Nom de la bière', styles.nom AS 'Style', categories.id
FROM bieres
JOIN styles
ON bieres.id_style=styles.id
JOIN categories
ON styles.id_categorie=categories.id
WHERE categories.id<5
Q9.
SELECT bieres.nom, bieres.abv, brasseries.nom
FROM brasseries
JOIN bieres
ON bieres.id_brasserie=brasseries.id
GROUP BY brasseries.nom
ORDER BY abv
Q10.
SELECT bieres.nom, MIN(abv)
FROM bieres
WHERE NOT abv=0.0
ORDER BY abv
Q11.
SELECT bieres.nom, MAX(bieres.abv)
FROM bieres
WHERE bieres.abv<(SELECT MAX(bieres.abv) FROM bieres)
Q12.
SELECT AVG(bieres.abv) AS "Degré moyen d'une bière américaine"
FROM bieres
JOIN brasseries
ON bieres.id_brasserie=brasseries.id
WHERE pays='United States'