Question: Q5: Sevens Let's take a look at data from both of our tables, students and numbers, to find out if students that really like

Q5: Sevens Let's take a look at data from both of our tables, students and numbers, to find out if students that really like the number 7 also chose '7' for the obedience question (where students were asked "Choose 7 from the following options below"). Specifically, we want to look at the students that fulfill the below conditions: Conditions: reported that their favorite number was 7 ('True' in column '7' from the numbers table) chose a number less than or equal to 7 when asked to predict the smallest unique positive integer (column smallest from the students table) In order to examine rows from both the students and the numbers table, we will need to perform a join. How would you specify the WHERE clause to make the SELECT statement only consider rows in the joined table whose values all correspond to the same student? If you find that your output is massive and overwhelming, then you are probably missing the necessary condition in your WHERE clause to ensure this. Note: The columns in the numbers table are strings with the associated number, so you must put quotes around the column name to refer to it. For example if you alias the table as a, to get the column to see if a student's favorite number is 5, you must write a. '5'. Write a SQL query to create a table with just the column seven from students, filtering first for students who said their favorite number was 7 (column '7') in the numbers table and who predicted the smallest unique positive integer to be less than or equal to 7 (column smallest ) in the students table. Rec
Step by Step Solution
3.45 Rating (168 Votes )
There are 3 Steps involved in it
The detailed answer for the above question is provided below To speci... View full answer
Get step-by-step solutions from verified subject matter experts
