Strata Scratch Problem Sets

Problem sets, exercises, and educational guides for SQL and python. These exercises are specifically tailored for business and marketing analytics students and novices.

Back to the Strata Scratch website
Login to Strata Scratch

Library Usage Exercises

This exercise uses the datasets.library_usage table and includes the demographics of the different amount of checkouts from different types of people and libraries.

The column patron_type_definition describes whether they are an adult, senior, junior, staff, etc. Total_checkouts shows the number of times this person checked out books in the SF libraries. Total_renewals show how many times they renewed. The age-range shows what age bracket the users belong. Home_library_definition shows where their home library in SF is. circulation_active-month shows the month they checked out the book from the SF library. circulation year shows the year that the book was checked out from the SF libraries. notice_preference-definition provides the option whether they want their notification in email, print, or phone call. year-patron registered contains the year they registered as a member of the SF libraries. Questions in the exercises involve the patron type, number of checkouts and renewal, age range, library name, circulation month and year, email address, patron resisted and supervisor district.

Question 1

How many patrons made a checkout once, twice… up to 10 times?

Question 2

How many libraries had 100 total checkouts in February 2015?

Question 3

How many emails were FALSE in 2016 in each library?

Question 4

How many people registered in 2016?

Question 5

Which library had the most total checkouts from ADULTS in 2010?

Question 6

Which library had the most checkouts from adults aging 65 to 74 years in April 2015?

Question 7

What is the month during which the main library had the highest number of checkouts in 2013?

Question 8

What is the average of total checkouts from the Chinatown library in January 2016?

Question 9

Which libraries have highest numbers of total renewals?

Question 10

How many library patrons renewed books less than 10 times in July 2014?