Signed-off-by: Bill Erickson <berickxx@gmail.com>
--- /dev/null
+/* Generate a list of student cards created today.
+ Useful for debugging and sharing with staff. */
+
+SELECT
+ au.id,
+ ac.barcode,
+ au.usrname,
+ au.first_given_name,
+ au.second_given_name,
+ au.family_name,
+ au.profile,
+ au.juvenile,
+ au.ident_type,
+ au.home_ou,
+ au.net_access_level,
+ au.ident_value,
+ au.create_date,
+ au.expire_date,
+ au.dob,
+ au.day_phone,
+ au.email,
+ aua.street1,
+ aua.street2,
+ aua.city,
+ aua.post_code,
+ aua.state,
+ aua.county,
+ aua.country,
+ aua.within_city_limits,
+ aua.valid
+FROM actor.usr au
+ JOIN actor.card ac ON (ac.id = au.card)
+ JOIN actor.usr_address aua ON (aua.id = au.mailing_address)
+WHERE
+ au.profile = 901 AND
+ DATE(au.create_date) = CURRENT_DATE
+ORDER BY au.usrname;
+
+
+