adding kmig reporter
[migration-tools.git] / kmig.d / xml / stock_reports.xml
1 <reports_file>
2     <!-- CORE REPORTS -->
3
4     <report>
5         <name>borrower_counts</name>
6         <tag>borrowers</tag>
7         <iteration>0</iteration>
8         <report_title>Borrowers Imported</report_title>
9         <heading>Count.Branch.Borrower Category</heading>
10         <query>SELECT COUNT(*), branchcode, categorycode FROM borrowers GROUP BY 2, 3</query>
11     </report>
12
13     <report>
14         <name>borrower_attributes</name>
15         <tag>borrowers</tag>
16         <iteration>0</iteration>
17         <report_title>Borrowers Imported</report_title>
18         <heading>Borrower Count.Attrribute.Value</heading>
19         <query>SELECT COUNT(*), code, attribute FROM borrower_attributes GROUP BY 2, 3 ORDER BY 2, 3</query>
20     </report>
21
22     <report>
23         <name>borrower_letters</name>
24         <tag>borrowers</tag>
25         <iteration>0</iteration>
26         <report_title>Letters Created</report_title>
27         <heading>Letter Count.Module.Code</heading>
28         <query>SELECT COUNT(*), module, code from letter GROUP BY 2, 3</query>
29     </report>
30
31      <report>
32         <name>bibs_loaded</name>
33         <tag>bibs</tag>
34         <report_title>Bibliographic Records Loaded</report_title>
35         <heading>Count</heading>
36         <query>SELECT COUNT(*) AS 'Number of Bib Records Loaded' FROM biblio;</query>
37     </report>
38
39      <report>
40         <name>auths_loaded</name>
41         <tag>bibs</tag>
42         <report_title>Authority Records Loaded</report_title>
43         <heading>Count</heading>
44         <query>SELECT COUNT(*) AS 'Number of Authority Records Loaded' FROM auth_header;</query>
45     </report>
46
47      <report>
48         <name>items_by_type_ccode_branch</name>
49         <tag>items</tag>
50         <report_title>Items by Item Type and Collection Code By Branch</report_title>
51         <heading>Branch.Count of Items Loaded.Item Type.Collection Code</heading>
52         <query>SELECT homebranch, COUNT(*), itype, ccode FROM items GROUP BY 1, 3, 4 ORDER BY 1, 3, 4;</query>
53     </report>
54
55      <report>
56         <name>items_by_location</name>
57         <tag>items</tag>
58         <report_title>Items Loaded by Location</report_title>
59         <heading>Count.Location</heading>
60         <query>SELECT COUNT(*), location FROM items GROUP BY 2;</query>
61     </report>
62
63      <report>
64         <name>items_by_lost</name>
65         <tag>items</tag>
66         <report_title>Items by Lost Value</report_title>
67         <heading>Count.Lost Status</heading>
68         <query> SELECT COUNT(*), CASE WHEN itemlost = 0 THEN 'Not Lost' WHEN itemlost = 1 THEN 'Lost' WHEN itemlost = 2 THEN 'Long Overdue' WHEN itemlost = 3 THEN 'Lost and Paid For' WHEN itemlost = 4 THEN 'Missing' END FROM items GROUP BY 2;</query>
69     </report>
70
71      <report>
72         <name>circs_by_due_date</name>
73         <tag>circs</tag>
74         <report_title>Migrated Circulations with Due Dates</report_title>
75         <heading>Count.Due Date</heading>
76         <query>SELECT COUNT(*), YEAR(date_due) FROM issues GROUP BY 2</query>
77     </report>
78
79      <report>
80         <name>accounts_loaded</name>
81         <tag>accounts</tag>
82         <report_title>Accounts Loaded</report_title>
83         <heading>Count of Migrated Fines.Sum of Migrated Fines</heading>
84         <query>SELECT COUNT(*), SUM(amountoutstanding) FROM accountlines;</query>
85     </report>
86
87      <report>
88         <name>reserves_loaded</name>
89         <tag>reserves</tag>
90         <report_title>Count of Reserves Loaded</report_title>
91         <heading>Count</heading>
92         <query>SELECT COUNT(*) FROM reserves;</query>
93     </report>
94
95      <report>
96         <name>courses_loaded</name>
97         <tag>courses</tag>
98         <report_title>Count of Courses Loaded</report_title>
99         <heading>Count</heading>
100         <query>SELECT COUNT(*) FROM courses;</query>
101     </report>
102
103      <report>
104         <name>course_reserves_loaded</name>
105         <tag>courses</tag>
106         <report_title>Count of Course Reserves Loaded</report_title>
107         <heading>Count</heading>
108         <query>SELECT COUNT(*) FROM course_reserves;</query>
109     </report>
110
111      <report>
112         <name>course_items_linked</name>
113         <tag>courses</tag>
114         <report_title>Count of Course Items</report_title>
115         <heading>Count</heading>
116         <query>SELECT COUNT(*) FROM course_items;</query>
117     </report>
118
119      <report>
120         <name>course_instructors_linked</name>
121         <tag>courses</tag>
122         <report_title>Count of Course Instructors</report_title>
123         <heading>Count</heading>
124         <query>SELECT COUNT(*) FROM course_instructors;</query>
125     </report>
126 </reports_file>
127