bonsoir tout le monde ... dans cette requête je veux affiche le total des consommation , pour les plats il affiche le bon résultat mais pour la boisson ou les Gâteau il m'affiche le résultat * nombre de linge dans la table contenirplat) merci d'avance pour l'aide svp



Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
select  distinct clienthotel.nom, clienthotel.prenom,clienthotel.telephone, clienthotel.numPieceIdentification,clienthotel.typePieceIdentification,
       reserverchambre.dateFin-reserverchambre.dateFin As NombreJours ,
 
 sum(contenirplat.nombrePlat*plat.prix)As Plats, 
 sum(contenirgateau.nombreGateau*gateaupatisserie.prix) As Gateaux , 
 sum(contenirboisson.quantite*boisson.prix)As Boisson
 
From clienthotel,reserverchambre,roomservice,commanderestaurant,contenirplat,contenirboisson,contenirgateau,plat,boisson,gateaupatisserie
 
where clienthotel.id=reserverchambre.idClientHotel
 
and roomservice.idReserverchambre=reserverchambre.id
 
and roomservice.idCommanderestaurant=commanderestaurant.id
 
and commanderestaurant.id=contenirplat.idCommandeRestaurant
 
and commanderestaurant.id=contenirboisson.idCommandeRestaurant
 
and commanderestaurant.id=contenirgateau.idCommandeRestaurant
 
and contenirplat.idPlat=plat.id
 
and contenirboisson.idBoisson=boisson.id
 
and contenirgateau.idGateauPatisserie=gateaupatisserie.id
 
and reserverchambre.id=16
Group by reserverchambre.id