Pastebin
Retrouvez, créez et partagez vos snippets en temps réel.
Rechercher un Pastebin
Aucun paste trouvé.
Créer un paste
Pastebin
Blog
xyz
regardant cette base de donnée : # Client('primaire'NumClient, Nom, Prenom, ville) # Produit('primaire'RefProduit, NomProduit, PrixUnitaire, Stock) # Commande('primaire'NumCommande, 'étrangère'NumClient, DateCommande) #LigneCommande('étrangère'NumCommande, 'étrangère'RefProduit, Quantite) et suivant cette consigne: #c) Total d´epens´e par chaque client (Nom, Pr´enom, Total) par ordre croissant de #d´epense corrige mon erreur: select cli.nom, cli.prenom, (sum(p.Prixunitaire)*l.quantite) as TotalDepense from client cli join commande com on cli.numclient=com.numclient join lignecommande l on com.numcommande=l.numcommande join produit p on l.refproduit=p.refproduit group by cli.numclient order by TotalDepense desc;
Créé il y a 2 mois.