1 2 3 4 5 6 7 8
| select top 30 Nom, "Prénom", o.Code_Oeuvre, e.Code_Auteur, Titre, "Année", c."Catégorie", c."Code_Catégorie", count(o.code_oeuvre) as Emprunté
from Oeuvre o
join "Catégories" c on c."code_catégorie"=o."catégorie"
join Ecrire e on o.code_oeuvre=e.code_oeuvre
join Auteur a on a.code_auteur=e.code_auteur
join "Prêter" p on p."N°Oeuvre"=o.code_oeuvre
group by Nom, "Prénom", o.Code_Oeuvre, e.Code_Auteur, Titre, "Année", c."Catégorie", c."Code_Catégorie", "Date du Prêt"
order by "Emprunté" desc, "Date du Prêt" desc; |
Partager