Survey Data

Long long ago, cs61a asked their students to complete a brief online survey through Google Forms, which involved relatively random but fun questions. In this lab, we will interact with the results of the survey by using SQL queries to see if we can find interesting things in the data.

First, take a look at lab11_data.sql and examine the table defined in it. Note its structure. You will be working with the two tables (students and numbers) in this file.

students

The first is the table students, which is the main results of the survey. Each column represents a different question from the survey, except for the first column, which is the time of when the result was submitted. The time is a unique identifier for each of the rows in the table. The last several columns all correspond to the last question on the survey (more details below.)

Column Name Question
time The unique timestamp that identifies the submission
number What's your favorite number between 1 and 100?
color What is your favorite color?
seven Choose the number 7 below.
Options:
  • 7
  • Choose this option instead
  • seven
  • the number 7 below.
  • You're not the boss of me!
song If you could listen to only one of these songs for the rest of your life, which would it be?
Options:
  • "Smells Like Teen Spirit" by Nirvana
  • "Shelter" by Porter Robinson
  • "Clair de Lune" by Claude Debussy
  • "Dancing Queen" by ABBA
  • "Down With The Sickness" by Disturbed
  • "Everytime We Touch" by Cascada
  • "All I want for Christmas is you" by Mariah Carey
  • "STAY" by The Kid LAROI, Justin Bieber
  • "Old Town Road" by Lil Nas X
  • "Turntables" by Janelle MonĂ¡e
  • "Shake It Off" by Taylor Swift
date Pick a day of the year!
pet If you could have any animal in the world as a pet, what would it be?
instructor Choose your favorite photo of John DeNero
smallest Try to guess the smallest unique positive INTEGER that anyone will put!

numbers

The second table is numbers, which is the results from the survey in which students could select more than one option from the numbers listed, which ranged from 0 to 10 and included 2021, 2022, 9000, and 9001. Each row has a time (which is again a unique identifier) and has the value "True" if the student selected the column or "False" if the student did not. The column names in this table are the following strings, referring to each possible number: 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 2021, 2022, 9000, 9001.

Since the survey was anonymous, we used the timestamp that a survey was submitted as a unique identifier. A time in students matches up with a time in numbers. For example, a row in students whose time value is "11/17/2021 10:52:40" matches up with the row in numbers whose time value is "11/17/2021 10:52:40". These entries come from the same Google form submission and thus belong to the same student.