2 <!-- sample reports entry
4 <name>name of report</name>
5 <iteration value='0' /> which version, the first version to run is 0, first backup is 1, then so on
6 <tag>money</tag> arbitrary tags, each should go in separate tag
7 <report_title>Migrated Billings</report_title> title used in the asciidoc output
8 <heading column='1'>Number of Billings.Migrated.Total</heading> period delimited
9 <query>SELECT COUNT(id),x_migrate,SUM(amount) FROM money_billing_legacy GROUP BY 2;</query> query itself, will be replaced
10 <note>Arbitrary note that can be included in the entries.</note>
17 <name>rm_load_circ_count</name>
19 <iteration>0</iteration>
20 <report_title>Circulations in Extract</report_title>
21 <heading>Count of Circs.Status</heading>
22 <query>SELECT COUNT(id), l_is_checked_out FROM asset_copy_legacy GROUP BY 2</query>
30 <name>rm_load_asset_by_resource_type</name>
31 <report_title>Count of Copies in Extract by Resource Type</report_title>
33 <iteration>0</iteration>
34 <heading>Count.Resource Type</heading>
35 <query>SELECT COUNT(*), l_resource_type FROM asset_copy_legacy GROUP BY 2 ORDER BY 2</query>
39 <name>rm_load_asset_by_location</name>
40 <report_title>Count of Copies in Extract by Location</report_title>
42 <iteration>0</iteration>
43 <heading>Count.Location</heading>
44 <query>SELECT COUNT(*), l_location FROM asset_copy_legacy GROUP BY 2 ORDER BY 2</query>
48 <name>rm_load_asset_by_category</name>
49 <report_title>Count of Copies in Extract by Category</report_title>
51 <iteration>0</iteration>
52 <heading>Count.Category</heading>
53 <query>SELECT COUNT(*), l_category FROM asset_copy_legacy GROUP BY 2 ORDER BY 2</query>
57 <name>rm_load_asset_by_status</name>
58 <report_title>Count of Copies in Extract by Status</report_title>
60 <iteration>0</iteration>
61 <heading>Count.Status</heading>
62 <query>SELECT COUNT(*), l_status FROM asset_copy_legacy GROUP BY 2 ORDER BY 2</query>
70 <name>rm_accounts_with_fines</name>
71 <report_title>Count of Accounts with a Grocery Bill to Migrate</report_title>
73 <iteration>0</iteration>
74 <heading>Count</heading>
75 <query>SELECT COUNT(*) FROM fines</query>
79 <name>rm_fine_w_no_account</name>
80 <report_title>Fines with No Matching Account</report_title>
82 <iteration>0</iteration>
83 <heading>First Name.Last Name.Fine Amount</heading>
84 <query>SELECT first_given_name, family_name, amount FROM fines WHERE au_id IS NULL ORDER BY 2, 1</query>
88 <name>rm_fine_w_multi_matching</name>
89 <report_title>Fines with Multiple Matching Accounts</report_title>
91 <iteration>0</iteration>
92 <heading>First Name.Last Name.Fine Amount</heading>
93 <query>SELECT first_given_name, family_name, amount FROM fines WHERE multi_au IS TRUE ORDER BY 2, 1</query>
101 <name>rm_load_bibs_loaded</name>
102 <report_title>Bibs Successfully Staged</report_title>
104 <iteration>0</iteration>
105 <heading>Count</heading>
106 <query>SELECT COUNT(eg) FROM bib_id_map</query>
112 <name>rm_actor_address_summary</name>
113 <report_title>Patrons Address Components</report_title>
115 <iteration>0</iteration>
116 <heading>Count.Address Component</heading>
117 <query>SELECT COUNT(id), 'Address 1' FROM actor_usr_legacy WHERE LENGTH(l_address_1) > 1
118 UNION ALL SELECT COUNT(id), 'Address 2' FROM actor_usr_legacy WHERE LENGTH(l_address_2) > 1
119 UNION ALL SELECT COUNT(id), 'City' FROM actor_usr_legacy WHERE LENGTH(l_city) > 1
120 UNION ALL SELECT COUNT(id), 'State' FROM actor_usr_legacy WHERE LENGTH(l_state) > 1
121 UNION ALL SELECT COUNT(id), 'County' FROM actor_usr_legacy WHERE LENGTH(l_country) > 1
122 UNION ALL SELECT COUNT(id), 'Zip Code' FROM actor_usr_legacy WHERE LENGTH(l_zip_code) > 1
127 <name>rm_actor_expirations</name>
128 <report_title>Patrons by Year of Expiration</report_title>
130 <iteration>0</iteration>
131 <heading>Count.Expiration Year</heading>
132 <query>SELECT COUNT(id), RIGHT(BTRIM(l_membership_expiry),4) FROM actor_usr_legacy GROUP BY 2 ORDER BY 2;
137 <name>rm_actor_barcodes</name>
138 <report_title>Patrons by Barcode Length</report_title>
140 <iteration>0</iteration>
141 <heading>Count.Barcode Length</heading>
142 <query>SELECT COUNT(id), LENGTH(l_barcode) FROM actor_usr_legacy GROUP BY 2 ORDER BY 2;
147 <name>rm_actor_birthdates</name>
148 <report_title>Patrons with Birthdates</report_title>
150 <iteration>0</iteration>
151 <heading>Count</heading>
152 <query>SELECT COUNT(id) FROM actor_usr_legacy WHERE LENGTH(l_birthdate) > 1;
157 <name>rm_actor_groups</name>
158 <report_title>Patrons by User Groups</report_title>
160 <iteration>0</iteration>
161 <heading>Count.Group</heading>
162 <query>SELECT COUNT(id), l_user_group FROM actor_usr_legacy GROUP BY 2 ORDER BY 2;
167 <name>rm_actor_access</name>
168 <report_title>Patrons by Access Field</report_title>
170 <iteration>0</iteration>
171 <heading>Count.Access</heading>
172 <query>SELECT COUNT(id), l_access_if_applicable FROM actor_usr_legacy GROUP BY 2 ORDER BY 2;
177 <name>rm_actor_contact_summary</name>
178 <report_title>Patrons Contact Fields</report_title>
180 <iteration>0</iteration>
181 <heading>Count.Address Component</heading>
182 <query>SELECT COUNT(id), 'email' FROM actor_usr_legacy WHERE LENGTH(l_e_mail) > 1
183 UNION ALL SELECT COUNT(id), 'Phone (home)' FROM actor_usr_legacy WHERE LENGTH(l_phone_home) > 1
184 UNION ALL SELECT COUNT(id), 'Phone (work)' FROM actor_usr_legacy WHERE LENGTH(l_phone_work) > 1
185 UNION ALL SELECT COUNT(id), 'Phone (cell)' FROM actor_usr_legacy WHERE LENGTH(l_phone_cell) > 1
190 <name>rm_actor_comments</name>
191 <report_title>Patrons Comments Count and Sample</report_title>
193 <iteration>0</iteration>
194 <heading>Count.Sample</heading>
195 <query>SELECT COUNT(id), 'All Comments' FROM actor_usr_legacy WHERE LENGTH(l_comments) > 1
196 UNION ALL SELECT NULL, l_comments FROM actor_usr_legacy WHERE LENGTH(l_comments) > 1 LIMIT 10
201 <name>rm_actor_circulation_note</name>
202 <report_title>Patrons Circulation Notes Count and Sample</report_title>
204 <iteration>0</iteration>
205 <heading>Count.Sample</heading>
206 <query>SELECT COUNT(id), 'All Notes' FROM actor_usr_legacy WHERE LENGTH(l_circulation_note) > 1
207 UNION ALL SELECT NULL, l_circulation_note FROM actor_usr_legacy WHERE LENGTH(l_circulation_note) > 1 LIMIT 10