select sum(expl_prix) as 'Dépenses acquisitions : Livres imprimés' from exemplaires left join notices on expl_notice=notice_id left join expl_custom_values on (expl_id=expl_custom_origine and expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc='a' and niveau_biblio='m' and year(expl_custom_date)=!!choixannee!!;
select sum(expl_prix) as 'Dépenses acquisitions : Publications en série imprimées' from exemplaires left join bulletins on expl_bulletin=bulletin_id left join notices on bulletin_notice=notice_id left join expl_custom_values on (expl_id=expl_custom_origine and expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_bulletin!=0 and niveau_biblio='s' and year(expl_custom_date)=!!choixannee!!;
select sum(expl_prix) as 'Dépenses acquisitions : Documents sonores' from exemplaires left join notices on expl_notice=notice_id left join expl_custom_values on (expl_id=expl_custom_origine and expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc in ('i','j') and niveau_biblio='m' and year(expl_custom_date)=!!choixannee!!;
select sum(expl_prix) as 'Dépenses acquisitions : Documents audiovisuels' from exemplaires left join notices on expl_notice=notice_id left join expl_custom_values on (expl_id=expl_custom_origine and expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc='g' and niveau_biblio='m' and year(expl_custom_date)=!!choixannee!!;
select sum(expl_prix) as 'Dépenses acquisitions : Livres électroniques' from exemplaires left join notices on expl_notice=notice_id left join expl_custom_values on (expl_id=expl_custom_origine and expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc='l' and niveau_biblio='m' and year(expl_custom_date)=!!choixannee!!;
select sum(expl_prix) as 'Dépenses acquisitions : Autres documents non électroniques' from exemplaires left join notices on expl_notice=notice_id left join expl_custom_values on (expl_id=expl_custom_origine and expl_custom_champ in (select idchamp from expl_custom where name="date_acquisition")) where expl_location in (!!choixlocation!!) and expl_owner=!!choixproprio!! and expl_notice!=0 and typdoc not in ('a','g','i','j','l') and niveau_biblio='m' and year(expl_custom_date)=!!choixannee!!;