Part 1
1

Chapter 6 :
Regrouper : GROUP BY

Exercice sur les regroupements : Exercice SQL n°2

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

Statement
Le nom de chaque film avec la durée de location la plus longue. 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
MAX(duree)
Bernie
5
C'est arrivé près de chez vous
2
Intouchables
3
Machete
4
Matrix 1
2
Ong Bak
3
Shoot' Em UP
2
Tigres et dragons
1
2 / 3
Exercice sur les regroupements