SQL Queries

In this challenge you'll be be writing a number of different SQL queries against our school database. Once you have a working query, check your work against the database.

For submission of this challenge, touch a new file with the SQL statements you've written to get the desired result.

Select all rows from the classes table.

Select the name and credits from the classes table where the number of credits is greater than 3.

All rows from the classes table where credits is an even number.

All of Tianna's enrollments that she hasn't yet received a grade for.

All of Tianna's enrollments that she hasn't yet received a grade for, selected by her first name, not her student.id

All of Tianna's enrollments that she hasn't yet received a grade for, selected by her first name, not her student.id, with the class name included in the result set.

All students born before 1986 who have a 't' in their first or last name.

The average age of all the students.

Addresses that have a space in their city name.

Students & their addresses that live in a city with more than one word in the city name.

The average number of credits for classes offered at the school.

The first and last name of all students who have received an 'A'.

Each student's first name and the total credits they've enrolled in

The total number of credits each student has received a grade for.

All enrollments, including the class name.

Students born between 1982-1985 (inclusive).

Insert a new enrollment recording that Andre Rohan took PHYS 218 and got an A.