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



  1. How many of passengers embarked on the Titanic?

    Table: datasets.titanic

  2. How many passengers were in first class (pclass = 1), were women and have survived the sinking (survived=1)?

    Tables: datasets.titanic

  3. How many athletes participated in the 2014 combine?

    Tables: datasets.nfl_combine

  4. What is the average weight of all the athletes?

    Tables: datasets.nfl_combine

  5. How many athletes were drafted into NFL in 2015?

    Tables: datasets.nfl_combine

  6. How many accounts performed a login in 2016?

    Tables: datasets.product_logins

  7. What were the top 10 songs in 2010? Include the rank, group name, and song name from highest ranked song to lowest.

    Tables: datasets.billboard_top_100_year_end

  8. What is Samantha’s and Lisa’s total sales revenue?

    Tables: datasets.sales_performance

  9. What is the average SAT score by school? Rank by highest average SAT score.

    Tables: datasets.sat_scores

  10. Count the number of user events by event_name from users on a macbook pro. Output should be ranked with highest event count first.

    Tables: datasets.playbook_events