Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Question 1
- select distinct noCage
- from LesAnimaux
- where type_an = 'lion' or type_an = 'leopard'; */
- /*Question 2
- select distinct nomE
- from LesAnimaux natural join LesGardiens
- where type_an = 'leopard';*/
- /*Question 3
- select nomE
- from LesGardiens natural join LesAnimaux
- where type_an = 'leopard'
- INTERSECT
- select nomE
- from LesGardiens natural join LesAnimaux
- where type_an = 'lion';*/
- /*Question 4
- select distinct nomE
- from LesMaladies natural join LesAnimaux natural join LesGardiens;*/
- /*Question 5
- select distinct nomE
- from LesMaladies natural join LesAnimaux natural join LesCages natural join LesResponsables;*/
- /*Question 6
- select distinct nomE
- from LesGardiens natural join LesAnimaux
- minus(select distinct nomE
- from LesGardiens
- natural join LesAnimaux where type_an <>'leopard');*/
- /* Question 7
- select nomE
- from LesGardiens natural join LesAnimaux
- where type_an = 'leopard'
- minus
- (select nomE
- from LesAnimaux natural join LesGardiens
- where type_an <> 'leopard');*/
- /*Question 8
- select count(distinct nomA)
- from LesMaladies;*/
- /*Question 9
- select nomM,count(nomA) as NombreDeMalades
- from LesMaladies
- group by nomM;*/
- /*Question 10
- select nomA,count(nomM)
- from LesMaladies
- group by nomA
- having count(nomM) >= 2;*/
- /*Question 11
- select nomE,count(fonction_cage)
- from LesAnimaux natural join LesGardiens
- where fonction_cage = 'fauve'
- group by nomE
- having count(fonction_cage) > 2;*/
- /*Question 12
- select nomE
- from LesResponsables natural join (select noAllee,count(noCage) as NombreDeCages
- from LesCages
- group by noAllee)
- where NombreDeCages = (select max(NombreDeCages)
- from(select noAllee,count(noCage) as NombreDeCages
- from LesCages
- group by noAllee));*/
- /*Question 13
- select nomE
- from LesResponsables natural join (select noAllee,count(noCage) as NombreDeCages
- from LesCages natural join (select noCage
- from LesAnimaux natural join LesMaladies)
- group by noAllee)
- where NombreDeCages = (select max(NombreDeCages)
- from (select noAllee,count(noCage) as NombreDeCages
- from LesCages natural join (select noCage
- from LesAnimaux natural join LesMaladies)
- group by noAllee));*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement