Actualités

Actualités

La vie de l’association

Formations, symposiums, hackathons, groupes de travail et astuces SQL : toutes les nouvelles de KohaLa et de la communauté Koha francophone.

Rapport SQL

Liste des notices avec des exemplaires pilonnés

SELECT CONCAT('<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=',b.biblionumber,'">Notice</a>') AS 'Notice', b.title AS 'Titre', b.author AS 'Auteur', MIN(i.withdrawn_on) AS 'Pilon depuis', COUNT(i.itemnumber) AS 'Nb exemplaires' FROM items i JOIN biblio b ON(i.biblionumber = b.biblionumber) WHERE b.biblionumber IN ( SELECT biblionumber FROM items GROUP BY biblionumber HAVING…

Lire l’article
  • Rapport SQL

    Liste des documents en retard réservés

    SELECT p.cardnumber, p.surname, p.firstname, p.phone, p.address, p.city, p.email, c.date_due, (TO_DAYS(curdate())-TO_DAYS( date_due)) AS ‘Jours de retards’, i.itype, b.title, b.author, i.barcode, COUNT(h.biblionumber) AS ‘NB…

  • Rapport SQL

    Liste des prêts en cours

    SELECT c.date_due, p.categorycode, b.title, b.author, i.itemcallnumber, i.barcode, i.location FROM issues c LEFT JOIN items i ON (c.itemnumber=i.itemnumber) LEFT JOIN borrowers p ON…

  • Rapport SQL

    Dépenses par poste budgétaire

    SELECT b.budget_name, format(sum(o.listprice*o.quantity),2) AS ‘amount spent’ FROM aqorders o LEFT JOIN aqbudgets b USING (budget_id) WHERE o.datereceived IS NOT NULL GROUP BY…

  • Rapport SQL

    Nombre de lecteurs actifs annuel

    SELECT YEAR (issuedate) AS ANNEE, categorycode AS CATEGORIE, COUNT(DISTINCT borrowernumber) AS NB_LECTEURS FROM ( SELECT issuedate, borrowernumber FROM old_issues UNION ALL SELECT…

  • Rapport SQL

    Bibliothèques de rapports Koha

    La bibliothèque communautaire de rapports Koha (en anglais) est une mine d’inspiration ! Pensez à adapter les requêtes à vos besoins et…

  • Rapport SQL

    Comment extraire les attributs lecteurs?

    SELECT borrowers.borrowernumber, borrowers.surname, borrowers.firstname, borrowers.cardnumber, borrower_attributes.code, borrower_attributes.attribute FROM borrowers LEFT JOIN borrower_attributes ON (borrowers.borrowernumber=borrower_attributes.borrowernumber) LEFT JOIN borrower_attribute_types ON (borrower_attribute_types.code=borrower_attributes.code) GROUP BY borrower_attributes.attribute…