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
682 B
25 lines
682 B
-- Query 31: Consommations les plus chères servies par Pillot Alain
|
|
|
|
SELECT
|
|
cns1.numcons AS 'numéro',
|
|
cns1.libcons AS 'libellé consommation',
|
|
cns1.prixcons AS 'prix'
|
|
FROM
|
|
consommation cns1
|
|
WHERE
|
|
cns1.prixcons = (
|
|
SELECT MAX(cns2.prixcons)
|
|
FROM consommation cns2
|
|
INNER JOIN comprend ON comprend.numcons = cns2.numcons
|
|
INNER JOIN facture ON facture.numfacture = comprend.numfacture
|
|
INNER JOIN serveur ON facture.numserveur = serveur.numserveur
|
|
WHERE
|
|
serveur.nomserveur = "Pillot Alain"
|
|
);
|
|
|
|
/* == RESULT ==
|
|
"Numéro","Libellé Consommation","Prix"
|
|
110,"Bière 50 Cl",4.5
|
|
200,"Bière Blonde",4.5
|
|
*/
|