select origine.expl_custom_small_text as 'Origine', count(distinct expl_id) as "Manuscrits : nombre d'acquisitions" from exemplaires left join notices on expl_notice=notice_id left join lenders on expl_owner=idlender left join expl_custom_values as origine on (expl_id=origine.expl_custom_origine and origine.expl_custom_champ in (select idchamp from expl_custom where name="origine")) left join expl_custom_values as date on (expl_id=date.expl_custom_origine and date.expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc='b' and niveau_biblio='m' and year(date.expl_custom_date)=!!annee!! group by 1 order by 1;
select origine.expl_custom_small_text as 'Origine', count(distinct expl_id) as "Documents cartographiques : nombre d'acquisitions" from exemplaires left join notices on expl_notice=notice_id left join lenders on expl_owner=idlender left join expl_custom_values as origine on (expl_id=origine.expl_custom_origine and origine.expl_custom_champ in (select idchamp from expl_custom where name="origine")) left join expl_custom_values as date on (expl_id=date.expl_custom_origine and date.expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc in ('e','f') and niveau_biblio='m' and year(date.expl_custom_date)=!!annee!! group by 1 order by 1;
select origine.expl_custom_small_text as 'Origine', count(distinct expl_id) as "Musique imprimée : nombre d'acquisitions" from exemplaires left join notices on expl_notice=notice_id left join lenders on expl_owner=idlender left join expl_custom_values as origine on (expl_id=origine.expl_custom_origine and origine.expl_custom_champ in (select idchamp from expl_custom where name="origine")) left join expl_custom_values as date on (expl_id=date.expl_custom_origine and date.expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc in ('c','d') and niveau_biblio='m' and year(date.expl_custom_date)=!!annee!! group by 1 order by 1;
select origine.expl_custom_small_text as 'Origine', count(distinct expl_id) as "Documents graphiques : nombre d'acquisitions" from exemplaires left join notices on expl_notice=notice_id left join lenders on expl_owner=idlender left join expl_custom_values as origine on (expl_id=origine.expl_custom_origine and origine.expl_custom_champ in (select idchamp from expl_custom where name="origine")) left join expl_custom_values as date on (expl_id=date.expl_custom_origine and date.expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc='k' and niveau_biblio='m' and year(date.expl_custom_date)=!!annee!! group by 1 order by 1;
select origine.expl_custom_small_text as 'Origine', count(distinct expl_id) as "Autres documents : nombre d'acquisitions" from exemplaires left join notices on expl_notice=notice_id left join lenders on expl_owner=idlender left join expl_custom_values as origine on (expl_id=origine.expl_custom_origine and origine.expl_custom_champ in (select idchamp from expl_custom where name="origine")) left join expl_custom_values as date on (expl_id=date.expl_custom_origine and date.expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc in ('r','m','l') and niveau_biblio='m' and year(date.expl_custom_date)=!!annee!! group by 1 order by 1;
select origine.expl_custom_small_text as 'Origine', count(distinct expl_id) as "Documents sonores : musique : nombre d'acquisitions" from exemplaires left join notices on expl_notice=notice_id left join lenders on expl_owner=idlender left join expl_custom_values as origine on (expl_id=origine.expl_custom_origine and origine.expl_custom_champ in (select idchamp from expl_custom where name="origine")) left join expl_custom_values as date on (expl_id=date.expl_custom_origine and date.expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc='j' and niveau_biblio='m' and year(date.expl_custom_date)=!!annee!! group by 1 order by 1;
select origine.expl_custom_small_text as 'Origine', count(distinct expl_id) as "Documents sonores : livres enregistrés : nombre d'acquisitions" from exemplaires left join notices on expl_notice=notice_id left join lenders on expl_owner=idlender left join expl_custom_values as origine on (expl_id=origine.expl_custom_origine and origine.expl_custom_champ in (select idchamp from expl_custom where name="origine")) left join expl_custom_values as date on (expl_id=date.expl_custom_origine and date.expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc='i' and niveau_biblio='m' and year(date.expl_custom_date)=!!annee!! group by 1 order by 1;
select origine.expl_custom_small_text as 'Origine', count(distinct expl_id) as "Documents audiovisuels : nombre d'acquisitions" from exemplaires left join notices on expl_notice=notice_id left join lenders on expl_owner=idlender left join expl_custom_values as origine on (expl_id=origine.expl_custom_origine and origine.expl_custom_champ in (select idchamp from expl_custom where name="origine")) left join expl_custom_values as date on (expl_id=date.expl_custom_origine and date.expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc='g' and niveau_biblio='m' and year(date.expl_custom_date)=!!annee!! group by 1 order by 1;