select count(distinct expl_id) as 'Autres documents : Total Unités Matérielles Eliminées' from exemplaires left join notices on expl_notice=notice_id left join docs_codestat on expl_codestat=idcode left join lenders on expl_owner=idlender left join expl_custom_values as datepilonnage on (expl_id=datepilonnage.expl_custom_origine and datepilonnage.expl_custom_champ in (select idchamp from expl_custom where name="date_pilon")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_statut=!!choixstatutpilon!! and expl_notice!=0 and typdoc in ('b','e','f','c','d','k','r','m','l') and niveau_biblio='m' and year(datepilonnage.expl_custom_date)=!!annee!!;
select count(distinct expl_id) as 'Documents audiovisuels : Total Unités Matérielles Eliminées' from exemplaires left join notices on expl_notice=notice_id left join docs_codestat on expl_codestat=idcode left join lenders on expl_owner=idlender left join expl_custom_values as datepilonnage on (expl_id=datepilonnage.expl_custom_origine and datepilonnage.expl_custom_champ in (select idchamp from expl_custom where name="date_pilon")) left join docs_location on expl_location=idlocation where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_statut=!!choixstatutpilon!! and expl_notice!=0 and typdoc in ('i','j','g') and niveau_biblio='m' and year(datepilonnage.expl_custom_date)=!!annee!!;