Part 1
1

Exercice sur les jointures : Exercice SQL n°5

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

Statement

Le nom de tous les clients et pour ceux qui ont loué un film, le nom du film loué et la durée de location. Le résultat sera affiché dans l'ordre alphabétique des noms des clients.

  • 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
nomcli
nomfilm
duree
Botas
Bernie
5
Botas
Collague
Dubois
Bernie
1
Dubois
Intouchables
3
Dubois
Ong Bak
3
Lontague
Bernie
3
Malon
Tigres et dragons
1
Malon
Machete
4
Noulas
C'est arrivé près de chez vous
1
Noulas
Shoot' Em UP
2
Point
Pondier
Matrix 1
2
Potillon
Volond
C'est arrivé près de chez vous
2