adding variant add subfield 9 that work only on tags with a 856 that matches conditio...
[migration-tools.git] / mig-xml / evergreen_full_system.xml
1 <reports_file>
2
3     <!-- CIRC REPORTS -->
4     <report>
5         <name>circ_count</name>
6         <tag>Circs</tag>
7         <iteration>0</iteration>
8         <report_title>Open Circulations</report_title>
9         <heading>Circulation Status.Count of Circs</heading>
10         <query>SELECT 'Closed Circulations', COUNT(id) FROM action.circulation WHERE xact_finish IS NOT NULL UNION ALL SELECT 'Open Circulations', COUNT(id) FROM action.circulation WHERE xact_finish IS NULL</query>
11     </report>
12
13     <report>
14         <name>circ_by_orgunit</name>
15         <tag>Circs</tag>
16         <iteration>0</iteration>
17         <report_title>Circulations by Org Unit</report_title>
18         <heading>Circulations Count.Org Unit</heading>
19         <query>SELECT COUNT(acirc.id), aou.name FROM action.circulation acirc JOIN actor.org_unit aou ON aou.id = acirc.circ_lib WHERE acirc.xact_finish IS NULL GROUP BY 2</query>
20     </report>
21
22      <report>
23         <name>circs_by_duration</name>
24         <tag>Circs</tag>
25         <iteration>0</iteration>
26         <report_title>Circulations by Duration, Fine and Max Fine</report_title>
27         <heading>Count of Circs.Duration.Fine.Max Fine</heading>
28         <query>SELECT COUNT(id), duration, recurring_fine, max_fine FROM action.circulation GROUP BY 2, 3, 4 ORDER BY 2, 3, 4</query>
29     </report>
30
31      <report>
32         <name>circs_by_usrgroup</name>
33         <tag>Circs</tag>
34         <iteration>0</iteration>
35         <report_title>Circulations by Rules and Patron Group</report_title>
36         <heading>Count of Circs.Duration.Fine.Max Fine.User Group</heading>
37         <query>SELECT COUNT(acirc.id), acirc.duration, acirc.recurring_fine, acirc.max_fine, pgt.name FROM action.circulation acirc JOIN actor.usr au ON au.id = acirc.usr JOIN permission.grp_tree pgt ON pgt.id = au.profile 
38             GROUP BY 2, 3, 4, 5 ORDER BY 2, 3, 4, 5</query>
39     </report>
40
41     <report>
42         <name>circs_by_circmod</name>
43         <tag>Circs</tag>
44         <iteration>0</iteration>
45         <report_title>Circulations by Rules and Circulation Modifier</report_title>
46         <heading>Count of Circs.Duration.Fine.Max Fine.Circulation Modifier</heading>
47         <query>SELECT COUNT(acirc.id), acirc.duration, acirc.recurring_fine, acirc.max_fine, ac.circ_modifier FROM action.circulation acirc JOIN asset.copy ac ON ac.id = acirc.target_copy
48              GROUP BY 2, 3, 4, 5 ORDER BY 2, 3, 4, 5</query>
49     </report>
50
51      <report>
52         <name>circs_by_orgunit</name>
53         <tag>Circs</tag>
54         <iteration>0</iteration>
55         <report_title>Circulations by Rules and Org Unit</report_title>
56         <heading>Count of Circs.Duration.Fine.Max Fine.Library Branch</heading>
57         <query>SELECT COUNT(acirc.id), acirc.duration, acirc.recurring_fine, acirc.max_fine, aou.name FROM action.circulation acirc JOIN actor.org_unit aou ON aou.id = acirc.circ_lib GROUP BY 2, 3, 4, 5 ORDER BY 2, 3, 4, 5</query>
58     </report>
59
60      <report>
61         <name>non_cat_circs</name>
62         <tag>Circs</tag>
63         <iteration>0</iteration>
64         <report_title>Non-Cataloged Circulation</report_title>
65         <heading>Circulations Count</heading>
66         <query>SELECT COUNT(id) FROM action.non_cataloged_circulation</query>
67     </report>
68
69      <report>
70         <name>in_house</name>
71         <tag>Circs</tag>
72         <iteration>0</iteration>
73         <report_title>In House Use</report_title>
74         <heading>In House Use Records</heading>
75         <query>SELECT COUNT(id) FROM action.in_house_use</query>
76     </report>
77
78      <report>
79         <name>circs_missing_rules</name>
80         <tag>Circs</tag>
81         <iteration>0</iteration>
82         <report_title>Circs Missing Rules</report_title>
83         <heading>Count.Field Missing</heading>
84         <query>SELECT COUNT(id), 'Duration Rule Value' FROM action.circulation WHERE duration IS NULL 
85             UNION ALL SELECT COUNT(id), 'Recurring Fine Rule Value' FROM action.circulation WHERE recurring_fine IS NULL 
86             UNION ALL SELECT COUNT(id), 'Max Fine Rule Value' FROM action.circulation WHERE max_fine IS NULL
87             UNION ALL SELECT COUNT(id), 'Duration Rule' FROM action.circulation WHERE duration_rule IS NULL       
88             UNION ALL SELECT COUNT(id), 'Recurring Fine Rule' FROM action.circulation WHERE recurring_fine_rule IS NULL      
89             UNION ALL SELECT COUNT(id), 'Max Fine Rule' FROM action.circulation WHERE max_fine_rule IS NULL
90         </query>
91     </report>
92
93     <!-- HOLDS REPORTS -->
94
95      <report>
96         <name>holds</name>
97         <tag>Holds</tag>
98         <iteration>0</iteration>
99         <report_title>Holds</report_title>
100         <heading>Hold Type.Hold Count</heading>
101         <query>SELECT 'Closed Holds', COUNT(id) FROM action.hold_request WHERE (expire_time::TIMESTAMP &lt; now()) OR cancel_time IS NOT NULL OR fulfillment_time IS NOT NULL UNION ALL SELECT 'Open Holds', COUNT(id) FROM action.hold_request WHERE (expire_time IS NULL OR expire_time::TIMESTAMP &gt; now()) AND cancel_time IS NULL AND fulfillment_time IS NULL</query>
102     </report>
103
104      <report>
105         <name>holds_bytype</name>
106         <tag>Holds</tag>
107         <iteration>0</iteration>
108         <report_title>Holds By Type</report_title>
109         <heading>Hold Type.Hold Count</heading>
110         <query>SELECT hold_type as "Hold Type", COUNT(id) FROM action.hold_request GROUP BY 1</query>
111     </report>
112
113      <report>
114         <name>transit_open_by_item_status</name>
115         <tag>Holds</tag>
116         <iteration>0</iteration>
117         <report_title>Transit Copy Records and Status of Linked Items</report_title>
118         <heading>Count.Status</heading>
119         <query>SELECT COUNT(atc.id), ccs.name FROM action.transit_copy atc JOIN asset.copy ac ON ac.id = atc.target_copy JOIN config.copy_status ccs ON ccs.id = ac.status WHERE atc.id IN (SELECT id FROM action.transit_copy) AND atc.dest_recv_time IS NULL GROUP BY 2 ORDER BY 2</query>
120     </report>
121
122      <report>
123         <name>transit_copies_by_status</name>
124         <tag>Holds</tag>
125         <iteration>0</iteration>
126         <report_title>Status of Items with Count of Open In Transits</report_title>
127         <heading>Count.Status.Count of Open Transits</heading>
128         <query>SELECT COUNT(ac.id), ccs.name, SUM(CASE WHEN atc.id IS NULL THEN 0 ELSE 1 END) FROM asset.copy ac JOIN config.copy_status ccs ON ccs.id = ac.status LEFT JOIN (SELECT * FROM action.transit_copy WHERE id IN (SELECT id FROM action.transit_copy) AND dest_recv_time IS NULL) atc ON atc.target_copy = ac.id WHERE ac.id IN (SELECT id from asset.copy) GROUP BY 2 ORDER BY 2</query>
129     </report>
130     
131      <report>
132         <name>hold_copies_by_status</name>
133         <tag>Holds</tag>
134         <iteration>0</iteration>
135         <report_title>Captured Holds with Status of Items</report_title>
136         <heading>Count of Captured Hold.Status of Item</heading>
137         <query>SELECT COUNT(ahr.id), ccs.name FROM action.hold_request ahr JOIN asset.copy ac ON ac.id = ahr.current_copy JOIN config.copy_status ccs ON ccs.id = ac.status WHERE ahr.capture_time IS NOT NULL AND ahr.fulfillment_time IS NULL and ahr.cancel_time IS NULL AND ahr.id IN (SELECT id FROM action.hold_request) GROUP BY 2 ORDER By 2</query>
138     </report>
139
140     <!-- ASSET REPORTS -->
141     
142     <report>
143         <name>asset.copy_count</name>
144         <report_title>Count of Copies by Library</report_title>
145         <tag>Assets</tag>
146         <iteration>0</iteration>
147         <heading>Copy Count.Library</heading>
148         <query>SELECT COUNT(ac.id), aou.name FROM asset.copy ac JOIN actor.org_unit aou ON aou.id = ac.circ_lib GROUP BY 2 ORDER BY 2</query>
149     </report>
150
151     <report>
152         <name>asset.deleted_copies</name>
153         <report_title>Deleted Copies</report_title>
154         <tag>Assets</tag>
155         <iteration>0</iteration>
156         <heading>Copy Count.Deleted</heading>
157         <query>SELECT COUNT(ac.id), ac.deleted::TEXT FROM asset.copy ac GROUP BY 2</query>
158     </report>
159
160     <report>
161         <name>asset.copies_by_status</name>
162         <report_title>Copies by Status</report_title>
163         <tag>Assets</tag>
164         <iteration>0</iteration>
165         <heading>Copy Count.Status</heading>
166         <query>SELECT COUNT(ac.id), cs.name FROM asset.copy ac JOIN config.copy_status cs ON cs.id = ac.status GROUP BY 2 ORDER BY 2</query>
167     </report>
168
169     <report>
170         <name>asset.circ_mod_copies_count</name>
171         <report_title>Copies by Circulation Modifier</report_title>
172         <tag>Assets</tag>
173         <iteration>0</iteration>
174         <heading>Copy Count.Circulation Modifier</heading>
175         <query>SELECT COUNT(ac.id), ac.circ_modifier FROM asset.copy ac GROUP BY 2 ORDER BY 2</query>
176     </report>
177
178     <report>
179         <name>asset.copy_notes</name>
180         <report_title>Copy Notes</report_title>
181         <tag>Assets</tag>
182         <iteration>0</iteration>
183         <heading>Note Count.Public</heading>
184         <query>SELECT COUNT(acnote.id), acnote.pub::TEXT FROM asset.copy_note acnote GROUP BY 2 ORDER BY 2</query>
185     </report>
186
187     <report>
188         <name>asset.copy_notes</name>
189         <report_title>Copy Notes</report_title>
190         <tag>Assets</tag>
191         <iteration>0</iteration>
192         <heading>Note Count.Public</heading>
193         <query>SELECT COUNT(acnote.id), acnote.pub::TEXT FROM asset.copy_note acnote GROUP BY 2 ORDER BY 2</query>
194     </report>
195
196    <report>
197         <name>asset.vols_by_lib</name>
198         <report_title>Volumes by Library</report_title>
199         <tag>Assets</tag>
200         <iteration>0</iteration>
201         <heading>Volume Count.Library</heading>
202         <query>SELECT COUNT(acn.id), aou.name FROM asset.call_number acn JOIN actor.org_unit aou ON aou.id = acn.owning_lib GROUP BY 2 ORDER BY 2</query>
203     </report>
204
205    <report>
206         <name>asset.vols_by_lib</name>
207         <report_title>Volumes by Library</report_title>
208         <tag>Assets</tag>
209         <iteration>0</iteration>
210         <heading>Volume Count.Library</heading>
211         <query>SELECT COUNT(acn.id), aou.name FROM asset.call_number acn JOIN actor.org_unit aou ON aou.id = acn.owning_lib GROUP BY 2 ORDER BY 2</query>
212     </report>
213
214    <report>
215         <name>asset.cops_by_loc_and_org</name>
216         <report_title>Copies by Location</report_title>
217         <tag>Assets</tag>
218         <iteration>0</iteration>
219         <heading>Copy Count.Library.Circ Library</heading>
220         <query>SELECT COUNT(ac.id), acl.name, aou.name FROM asset.copy ac JOIN asset.copy_location acl ON acl.id = ac.location JOIN actor.org_unit aou ON aou.id = ac.circ_lib GROUP BY 2, 3 ORDER BY 2, 3</query>
221     </report>
222
223     <report>
224         <name>asset.barcode_lengths</name>
225         <report_title>Barcode Lengths by Library</report_title>
226         <tag>Assets</tag>
227         <iteration>0</iteration>
228         <heading>Count of Barcode.Barcode Length.Library</heading>
229         <query>SELECT COUNT(ac.id), LENGTH(ac.barcode), aou.name FROM asset.copy ac JOIN actor.org_unit aou ON aou.id = ac.circ_lib GROUP BY 2, 3 ORDER BY 3, 2</query>
230     </report>
231
232    <report>
233          <name>asset.stat_cats</name>
234         <report_title>Copy Statistical Categories</report_title>
235         <tag>Assets</tag>
236         <iteration>0</iteration>
237         <heading>Stat Cat Count.Library.Statistical Category</heading>
238         <query>SELECT COUNT(ac_sc.id), aou.name, ac_sc.name FROM asset.stat_cat ac_sc JOIN actor.org_unit aou ON aou.id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
239     </report>
240
241     <report>
242          <name>asset.stat_cats</name>
243         <report_title>Copy Statistical Categories</report_title>
244         <tag>Assets</tag>
245         <iteration>0</iteration>
246         <heading>Stat Cat Count.Library.Statistical Category</heading>
247         <query>SELECT COUNT(ac_sc.id), aou.name, ac_sc.name FROM asset.stat_cat ac_sc JOIN actor.org_unit aou ON aou.id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
248     </report>
249
250     <report>
251         <name>asset.stat_cat_entries</name>
252         <report_title>Copy Stat Cat User Entries</report_title>
253         <tag>Assets</tag>
254         <iteration>0</iteration>
255         <heading>Copy Stat Count.Library.Statistical Category</heading>
256         <query>SELECT COUNT(map.id), aou.name, ac_sc.name FROM asset.stat_cat_entry_copy_map map JOIN asset.stat_cat ac_sc ON ac_sc.id = map.stat_cat JOIN actor.org_unit aou ON aou.id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
257     </report>
258
259     <report>
260         <name>asset.stat_cat_entries</name>
261         <report_title>Copy Stat Cat User Entries</report_title>
262         <tag>Assets</tag>
263         <iteration>0</iteration>
264         <heading>Copy Stat Count.Library.Statistical Category</heading>
265         <query>SELECT COUNT(map.id), aou.name, ac_sc.name FROM asset.stat_cat_entry_copy_map map JOIN asset.stat_cat ac_sc ON ac_sc.id = map.stat_cat JOIN actor.org_unit aou ON aou.
266 id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
267     </report>
268
269     <report>
270          <name>asset.copy_tags</name>
271         <report_title>Copy Tags</report_title>
272         <tag>Assets</tag>
273         <iteration>0</iteration>
274         <heading>Tag Count.Copy Tag Type.Copy Tag Label.Staff Note.Public</heading>
275         <query>SELECT COUNT(map.id), tag.tag_type, tag.label, tag.staff_note, tag.pub FROM asset.copy_tag tag JOIN asset.copy_tag_copy_map map ON map.tag = tag.id GROUP BY 2,3,4,5 ORDER BY 2,3</query>
276     </report>
277
278     <!-- MONEY REPORTS -->
279
280     <report>
281         <name>money.billing_voided</name>
282         <report_title>Bills Voided And Not</report_title>
283         <tag>Money</tag>
284         <iteration>0</iteration>
285         <heading>Count.Voided.Sum</heading>
286         <query>SELECT COUNT(a.id), a.voided::TEXT, SUM(a.amount) FROM money.billing a GROUP BY 2 ORDER BY 2</query>
287     </report>
288
289     <report>
290         <name>money.billing_voided</name>
291         <report_title>Bills Voided And Not</report_title>
292         <tag>Money</tag>
293         <iteration>0</iteration>
294         <heading>Count.Voided.Sum</heading>
295         <query>SELECT COUNT(a.id), a.voided::TEXT, SUM(a.amount) FROM money.billing a GROUP BY 2 ORDER BY 2, 3</query>
296     </report>
297
298     <report>
299         <name>money.billing_by_type</name>
300         <report_title>Bills by Type</report_title>
301         <tag>Money</tag>
302         <iteration>0</iteration>
303         <heading>Count.Billing Type</heading>
304         <query>SELECT COUNT(a.id), a.billing_type FROM money.billing a GROUP BY 2 ORDER BY 2</query>
305     </report>
306
307     <report>
308         <name>money.billing_by_type</name>
309         <report_title>Bills by Type</report_title>
310         <tag>Money</tag>
311         <iteration>0</iteration>
312         <heading>Count.Billing Type</heading>
313         <query>SELECT COUNT(a.id), a.billing_type FROM money.billing a GROUP BY 2 ORDER BY 2</query>
314     </report>
315
316     <report>
317         <name>money.cash_payment</name>
318         <report_title>Cash Payments</report_title>
319         <tag>Money</tag>
320         <iteration>0</iteration>
321         <heading>Count.Voided.Sum</heading>
322         <query>SELECT COUNT(a.id), a.voided::TEXT, SUM(a.amount) FROM money.cash_payment a GROUP BY 2 ORDER BY 2</query>
323     </report>
324
325     <report>
326         <name>money.cash_payment</name>
327         <report_title>Cash Payments</report_title>
328         <tag>Money</tag>
329         <iteration>0</iteration>
330         <heading>Count.Voided.Sum</heading>
331         <query>SELECT COUNT(a.id), a.voided::TEXT, SUM(a.amount) FROM money.cash_payment a GROUP BY 2 ORDER BY 2</query>
332     </report>
333
334     <report>
335         <name>money.check_payment</name>
336         <report_title>Check Payments</report_title>
337         <tag>Money</tag>
338         <iteration>0</iteration>
339         <heading>Count.Voided.Sum</heading>
340         <query>SELECT COUNT(a.id), a.voided::TEXT, SUM(a.amount) FROM money.check_payment a GROUP BY 2 ORDER BY 2</query>
341     </report>
342
343     <report>
344         <name>money.forgive_payment</name>
345         <report_title>Forgive Payments</report_title>
346         <tag>Money</tag>
347         <iteration>0</iteration>
348         <heading>Count.Voided.Sum</heading>
349         <query>SELECT COUNT(a.id), a.voided::TEXT, SUM(a.amount) FROM money.forgive_payment a GROUP BY 2 ORDER BY 2</query>
350     </report>
351
352     <!-- BIBS REPORTS -->
353     <report>
354         <name>bibswovolumes</name>
355         <report_title>Bibliographic Records Without Volumes</report_title>
356         <tag>Bibs</tag>
357         <iteration>0</iteration>
358         <heading>Count</heading>
359         <query>SELECT COUNT(id) FROM biblio.record_entry where id NOT IN (SELECT DISTINCT record FROM asset.call_number) AND deleted IS FALSE</query>
360     </report>
361
362     <report>
363         <name>bibs_notes</name>
364         <report_title>Bib Record Notes</report_title>
365         <tag>Bibs</tag>
366         <iteration>0</iteration>
367         <heading>Count</heading>
368         <query>SELECT COUNT(b.id) FROM biblio.record_note b</query>
369     </report>
370
371     <report>
372         <name>bibs_peers</name>
373         <report_title>Peer Bib Copies</report_title>
374         <tag>Bibs</tag>
375         <iteration>0</iteration>
376         <heading>Count</heading>
377         <query>SELECT COUNT(b.id) FROM biblio.peer_bib_copy_map b</query>
378     </report>
379
380     <report>
381         <name>bibs_parts</name>
382         <report_title>Monograph Parts</report_title>
383         <tag>Bibs</tag>
384         <iteration>0</iteration>
385         <heading>Count</heading>
386         <query>SELECT COUNT(b.id) FROM biblio.monograph_part b</query>
387     </report>
388
389     <!-- ACTORS REPORTS -->
390
391     <report>
392         <name>usrsbyorg</name>
393         <report_title>Patrons by Home Org</report_title>
394         <tag>Actors</tag>
395         <iteration>0</iteration>
396         <heading>Count.Library.Deleted</heading>
397         <query>SELECT COUNT(au.id), aou.name, au.deleted::TEXT  FROM actor.usr au JOIN actor.org_unit aou ON aou.id = au.home_ou GROUP BY 2, 3 ORDER BY 2, 3</query>
398     </report>
399
400     <report>
401         <name>usrsbypgt</name>
402         <report_title>Patrons by Permission Group</report_title>
403         <tag>Actors</tag>
404         <iteration>0</iteration>
405         <heading>Count.Permission Group</heading>
406         <query>SELECT COUNT(au.id), pgt.name FROM actor.usr au JOIN permission.grp_tree pgt ON pgt.id = au.profile GROUP BY 2 ORDER BY 2</query>
407     </report>
408
409     <report>
410         <name>active_usrs</name>
411         <report_title>Patrons by Active Status</report_title>
412         <tag>Actors</tag>
413         <iteration>0</iteration>
414         <heading>Count of Users.Active</heading>
415         <query>SELECT COUNT(id), active::TEXT FROM actor.usr GROUP BY 2</query>
416     </report>
417
418     <report>
419         <name>active_usr_barcodes</name>
420         <report_title>Patron Barcodes by Active Status</report_title>
421         <tag>Actors</tag>
422         <iteration>0</iteration>
423         <heading>Count of Barcodes.Active</heading>
424         <query>SELECT COUNT(id), active::TEXT FROM actor.card GROUP BY 2</query>
425     </report>
426
427    <report>
428         <name>usr_barcode_lengths</name>
429         <report_title>Barcode Lengths by Library</report_title>
430         <tag>Actors</tag>
431         <iteration>0</iteration>
432         <heading>Count of Barcode.Barcode Length.Library</heading>
433         <query>SELECT COUNT(acard.id), LENGTH(acard.barcode), aou.name FROM actor.card acard JOIN actor.usr au ON au.id = acard.usr JOIN actor.org_unit aou ON aou.id = au.home_ou GROUP BY 2, 3 ORDER BY 3, 2</query>
434     </report>
435
436     <report>
437         <name>usr_barcode_patterns</name>
438         <report_title>Common Barcode Starting Patterns</report_title>
439         <tag>Actors</tag>
440         <iteration>0</iteration>
441         <heading>Count of Barcodes (greater than 10).Left 60% of Characters</heading>
442         <query>SELECT COUNT(acard.id), LEFT(acard.barcode,(ROUND(LENGTH(acard.barcode)*.6))::INT) FROM actor.card acard GROUP BY 2 HAVING COUNT(acard.id) > 10 ORDER BY 2</query>
443     </report>
444
445    <report>
446         <name>usr_addressses_status</name>
447         <report_title>Patron Addresses by Valid Status</report_title>
448         <tag>Actors</tag>
449         <iteration>0</iteration>
450         <heading>Count.Valid</heading>
451         <query>SELECT COUNT(aua.id), valid::TEXT FROM actor.usr_address aua GROUP BY 2</query>
452     </report>
453
454    <report>
455         <name>usr_addresses_pending</name>
456         <report_title>Patron Addresses by Pending Status</report_title>
457         <tag>Actors</tag>
458         <iteration>0</iteration>
459         <heading>Count of Addresses.Pending</heading>
460         <query>SELECT COUNT(aua.id), pending::TEXT FROM actor.usr_address aua GROUP BY 2</query>
461     </report>
462
463    <report>
464         <name>usr_messages</name>
465         <report_title>Patron Messages</report_title>
466         <tag>Actors</tag>
467         <iteration>0</iteration>
468         <heading>Count.Deleted</heading>
469         <query>SELECT COUNT(aum.id), deleted::TEXT FROM actor.usr_message aum GROUP BY 2</query>
470     </report>
471
472    <report>
473         <name>usr_notes</name>
474         <report_title>Patron Notes</report_title>
475         <tag>Actors</tag>
476         <iteration>0</iteration>
477         <heading>Count.Public</heading>
478         <query>SELECT COUNT(aun.id), pub::TEXT FROM actor.usr_note aun GROUP BY 2</query>
479     </report>
480
481    <report>
482          <name>usr_stat_cats</name>
483         <report_title>Patron Statistical Categories</report_title>
484         <tag>Actors</tag>
485         <iteration>0</iteration>
486         <heading>Stat Cat Count.Library.Statistical Category</heading>
487         <query>SELECT COUNT(au_sc.id), aou.name, au_sc.name FROM actor.stat_cat au_sc JOIN actor.org_unit aou ON aou.id = au_sc.owner GROUP BY 2, 3 ORDER BY 2, 3</query>
488     </report>
489
490    <report>
491         <name>usr_stat_cat_entries</name>
492         <report_title>Patron Stat Cat User Entries</report_title>
493         <tag>Actors</tag>
494         <iteration>0</iteration>
495         <heading>Patron Stat Count.Library.Statistical Category</heading>
496         <query>SELECT COUNT(map.id), aou.name, au_sc.name FROM actor.stat_cat_entry_usr_map map JOIN actor.stat_cat au_sc ON au_sc.id = map.stat_cat JOIN actor.org_unit aou ON aou.id = au_sc.owner GROUP BY 2, 3 ORDER BY 2,3</query>
497     </report>
498
499     <!-- ACQUISITIONS REPORTS -->
500    <report>                                                                        
501         <name>fund_count</name>
502         <iteration>0</iteration>
503         <tag>Acq</tag>
504         <report_title>Funds</report_title>
505         <heading>Number of Funds</heading>
506         <query>SELECT COUNT(id) FROM acq.fund;</query>
507     </report>
508
509     <report>
510         <name>invoice_count</name>
511         <iteration>0</iteration>
512         <tag>Acq</tag>
513         <report_title>Invoices</report_title>
514         <heading>Number of Funds</heading>
515         <query>SELECT COUNT(id) FROM acq.invoice;</query>
516     </report>    
517
518     <!-- SERIALS REPORTS -->
519     <report>
520         <name>serials_mfhd_count</name>
521         <tag>serials</tag>
522         <iteration>0</iteration>
523         <report_title>Serial MFHDs</report_title>
524         <heading>Number of MFHDs</heading>
525         <query>SELECT COUNT(id) FROM serial.record_entry</query>
526     </report>
527
528 </reports_file>
529