SQL Basics
SQL Queries
100

What is a row of data called?

A record

100

Re-write the SQL query to correctly select everything from the shows table.

SELECT *

FROM shows;

200

What is a column of data called?

field

200

Re-write the SQL query to correctly select name and genre from the shows table. 

SELECT name, genre

FROM shows;

300

What keyword do we put before the name of the table in a SQL query?

FROM

300

Write the SQL query to choose the name, GPA, and age of all students listed in the students table.

SELECT name, GPA, age

FROM students;

400

What keyword do we put before the names of the columns that we are choosing in a SQL query?

SELECT

400

Write the SQL query to choose the name, GPA, and age of all students listed in the students table but only for students that live in the city of Pensacola or Mobile.

SELECT name, GPA, age

FROM students

WHERE city IN ('Pensacola', 'Mobile');

500

What does SQL stand for?

Structured Query Language

500

Write the SQL query to choose the name, GPA, and age of all students listed in the students table but only for students that live in the city of Pensacola or Mobile and whose major is Neuroscience and age is younger than 30.

SELECT name, GPA, age

FROM students

WHERE city IN ('Pensacola', 'Mobile')

AND major = 'Neuroscience'

AND age < 30;

M
e
n
u