You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
762 B

-- Query 12
SELECT
consommation.numcons,
consommation.libcons,
consommation.prixcons,
comprend.qte AS quantite,
comprend.qte * consommation.prixcons AS "prixcons*quantite",
serveur.nomserveur
FROM
comprend
INNER JOIN facture ON facture.numfacture = comprend.numfacture
INNER JOIN serveur ON serveur.numserveur = facture.numserveur
INNER JOIN consommation ON consommation.numcons = comprend.numcons
WHERE facture.numfacture = 1203;
/* == RESULT ==
"numcons","libcons","prixcons","quantite","prixcons*quantite","nomserveur"
101,"Café double",2,1,2,"Durant Pierre"
102,"Café crème",1.6,1,1.6,"Durant Pierre"
108,"Bière 33 Cl",3,1,3,"Durant Pierre"
121,"Fruit pressé",3,1,3,"Durant Pierre"
130,"Coca Cola",2,1,2,"Durant Pierre"
*/