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.

19 lines
396 B

-- Query 19
SELECT
serveur.numserveur,
serveur.nomserveur,
COUNT(facture.numfacture) AS "nb factures"
FROM
facture
INNER JOIN serveur ON serveur.numserveur = facture.numserveur
GROUP BY serveur.numserveur
HAVING COUNT(facture.numfacture) >= 5
ORDER BY serveur.numserveur DESC;
/* == RESULT ==
"numserveur","nomserveur","nb factures"
53,"Pillot Alain",16
52,"Martin Cathy",12
*/