Created
July 15, 2014 21:12
-
-
Save jgambill/53ee3636ef571a650964 to your computer and use it in GitHub Desktop.
Libstats data dump with human-friendly field values. For sending to staff in a spreadsheet. #libstats #mysql #sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT question_id, li.short_name, lo.location_name, qt.question_type, q.question_type_other, t.time_spent, q.referral_id, p.patron_type, qf.question_format, q.initials, q.hide, q.obsolete, q.question_date, q.client_ip, q.question, q.answer, q.delete_hide, q.date_added FROM libstats.questions q | |
LEFT JOIN libstats.libraries li on li.library_id=q.library_id | |
LEFT JOIN libstats.locations lo on lo.location_id=q.location_id | |
LEFT JOIN libstats.question_types qt on qt.question_type_id=q.question_type_id | |
LEFT JOIN libstats.patron_types p on p.patron_type_id=q.patron_type_id | |
LEFT JOIN libstats.question_formats qf on qf.question_format_id=q.question_format_id | |
LEFT JOIN libstats.time_spent_options t on t.time_spent_id=q.time_spent_id | |
LEFT JOIN libstats.users u on q.user_id=u.user_id | |
WHERE delete_hide=0 | |
ORDER BY q.question_date ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment