DEV_BUT1/tp1.txt
2023-04-04 14:03:16 +02:00

5 lines
447 B
Plaintext
Executable File

SELECT Region, count(DISTINCT Cru) FROM Vin GROUP BY Region;
SELECT Nom, NumVitic, count(DISTINCT Cru) FROM Viticulteur NATURAL JOIN Vin GROUP BY Nom, NumVitic;
SELECT NumBuveur, Nom, AVG(Qtte) FROM Buveur NATURAL JOIN Commande WHERE Ville = 'PARIS' GROUP BY NumBuveur, Nom;
SELECT Nom, Count(NumCom) FROM Commande NATURAL JOIN Buveur GROUP BY Nom;
SELECT Nom, COUNT(Qtte) FROM Buveur NATURAL JOIN Commande GROUP BY Nom HAVING AVG(Qtte) >= 12;