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