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

Basic SQL Exercises

Instructions

Questions

1. How many people embarked on the Titanic?

Schema: datasets

Table: titanic

Hint:

2. How many of survirors were women first class passengers?

Schema: datasets

Table: titanic

Hints:

3. What is the average fare paid by those who died in the accident?

Schema: datasets

Table: titanic

Hints:

4. How many people survived per passenger class?

Schema: datasets

Table: titanic

Hints:

5. What is the average height of quarterbacks?

Schema: datasets

Table: nfl_combine

Hints:

6. Which year had the highest number of players?

Schema: datasets

Table: nfl_combine

Hints:

7. How many players with weight <= 50 or weight >= 200 are there for each college?

Schema: datasets

Table: nfl_combine

Hints:

8. What are the best and worst total SAT scores per school?

Schema: datasets

Table: sat_scores

Hints:

9. How many students each teacher lectured to?

Schema: datasets

Table: sat_scores

Hints:

10. Who is the student who has highest efficency for mathematics? Efficency is defined as number of points obtained divided by hours studied.

Schema: datasets

Table: sat_scores

Hints