Nombre de prêt unique sur l'année précendente acquis 3 dernières années

Nombre de prêt unique sur l'année précédente acquis les 3 dernières années

Enquête: 
ESGBU
SQL: 
SELECT YEAR(issuedate) AS ANNEE, COUNT(DISTINCT itemnumber) AS NB_PRETS_UNIQUES FROM ( SELECT issuedate, itemnumber FROM old_issues UNION ALL SELECT issuedate, itemnumber FROM issues ) AS all_issues LEFT JOIN items USING (itemnumber) LEFT JOIN authorised_values v1 ON (items.notforloan = v1.authorised_value AND v1.category='statut' ) WHERE v1.lib='Empruntable' AND YEAR(issuedate)=(YEAR(CURDATE())-1) AND YEAR(items.dateaccessioned ) BETWEEN (YEAR(CURDATE())-4) AND (YEAR(CURDATE())-1) GROUP BY YEAR(issuedate) ORDER BY YEAR(issuedate) DESC
Type d'établissement: 
BU
Votre établissement: 
Ecole nationale des chartes