Part 1
1

Chapter 5 :
Les champs calculés et les fonctions d'agrégat

Exercice sur les fonctions et les agrégats : Exercice SQL n°2

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

Statement
Le nombre total de jours de location du client 1 dans une colonne qui portera comme titre "Nombre de jour de location client 1"
  • 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
  • Le code des films qui ont été loués sont dans la table Locations.
    Need a clue
Enter your response
Result to obtain
Request 1
Nombre de jour de location client 1
7
2 / 5
Exercice sur les fonctions et les agrégats