Cas Transair
TD : Cas Transair. Recherche parmi 300 000+ dissertationsPar Tarek Masnouhou • 25 Novembre 2015 • TD • 466 Mots (2 Pages) • 874 Vues
CAS TRANSAIR
1.
SELECT nompil, salaire
FROM pilote
WHERE salaire
BETWEEN '19000'
AND '23000';
2.
SELECT novol, vildep, dep_h, arr_h
FROM vol
WHERE vilarr = 'Londres'
AND arr_h <12
ORDER BY vildep, dep_h ASC ;
3.
SELECT nuavion, codetype
FROM avion
WHERE codetype LIKE '7%';
4.
SELECT novol
FROM affectation
WHERE dateserv = '02-03-2004';
5.
SELECT nompil, embauche, adresse
FROM pilote
WHERE adresse = 'Paris'
AND embauche < '01-01-2001'
OR embauche > '01-01-2002'
ORDER BY nompil ASC;
6.
SELECT novol, vildep, dep_h
FROM vol
ORDER BY vildep, dep_h;
7.
SELECT nompil, salaire
FROM pilote
WHERE comm IS NULL
AND salaire >20000
8.
SELECT nompil, vol.novol, vildep, vilarr
FROM pilote, vol, affectation
WHERE vol.novol = affectation.novol
AND pilote.nopilote = affectation.pilote
AND dateserv = '02-03-2004'
ORDER BY nompil;
9.
SELECT nompil, design
FROM pilote, vol, affectation, avion, appareil
WHERE vol.novol = affectation.novol
AND pilote.nopilote = affectation.pilote
AND avion.nuavion = affectation.avion
AND appareil.codetype = avion.codetype
AND adresse = 'Lyon'
AND nbvol < 12000 ;
10.
SELECT DISTINCT nopilote, nompil, vildep
FROM pilote, vol, affectation
WHERE vol.novol = affectation.novol
AND pilote.nopilote = affectation.pilote;
11.
SELECT DISTINCT nopilote, nompil, vildep
FROM pilote, vol, affectation
WHERE vol.novol = affectation.novol
AND pilote.nopilote = affectation.pilote
AND nopilote NOT IN (SELECT pilote
FROM affectation);
12.
SELECT novol, vildep, vilarr
FROM vol
WHERE vildep IN (SELECT vilarr
FROM vol)
AND vilarr IN (SELECT vildep
FROM vol);;
13.
SELECT nopilote, nompil, vol.novol, dateserv
FROM affectation, vol, pilote
WHERE vol.novol = affectation.novol
AND pilote.nopilote = affectation.pilote
AND vildep = 'Paris'
OR vilarr = 'Paris';
14.
SELECT DISTINCT codetype, design
FROM appareil, vol, affectation, avion
WHERE vol.novol = affectation.novol
AND avion.nuavion = affectation.avion
AND appareil.codetype = avion.codetype
AND vildep = 'Lyon'
AND vilarr = 'Londres';
15.
SELECT DISTINCT nuavion
FROM avion, vol, affectation
WHERE vol.novol = affectation.novol
AND avion.nuavion = affectation.avion
AND vildep = 'Paris'
OR vildep = 'Lyon';
17.
SELECT vol.novol, vildep, vilarr
FROM pilote, vol, affectation
WHERE vol.novol = affectation.novol
AND pilote.nopilote = affectation.pilote
AND vilarr IN (SELECT adresse
FROM pilote
WHERE adresse = vilarr);
...