Part 1
1

Exercice sur les regroupements : Exercice SQL n°3

The goal of the exercise is to apply what you have learned using the examples.

Statement
Le nom de chaque film ainsi que la durée moyenne de location arrondie à 1 chiffre après la virgule et dans une colonne qui s'appelle "Moyenne". Le résultat sera affiché dans l'ordre alphabétique des noms des films.
  • Show relational schema Download tables (PDF)
  • Table Clients (codecli, prenomcli, nomcli, ruecli, cpcli, villecli)
    Primary key : codecli

    Table Films (codefilm, nomfilm)
    Primary key : codefilm

    Table Locations (codecli, codefilm, datedebut, duree)
    Primary key : codecli, codefilm
    Foreign key : codefilm of the table Films, codecli of the table Clients
Enter your response
Result to obtain
Request 1
nomfilm
Moyenne
Bernie
3.0
C'est arrivé près de chez vous
1.5
Intouchables
3.0
Machete
4.0
Matrix 1
2.0
Ong Bak
3.0
Shoot' Em UP
2.0
Tigres et dragons
1.0