Skip to content

SQL practice exercises using a SQLite version of Poems By Kids

Notifications You must be signed in to change notification settings

nashville-software-school/poki-sqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Poems By Kids SQL Practice

The Poems By Kids database includes a large number of poems by children in various grades, associates with various emotions. Your task in the following exercises is to learn more about those poems using SQL queries.

Setup

Because this database is large, the database file, with all of the tables and rows you will need, has already been created for you and is included in this repo. You do not need to run the sql script included in this repo, but you should look at the first part of it to understand the structure of the database. Use that script to create an ERD for Poems By Kids that you can reference while working on the queries. Create a file called solutions.sql to store the answers to the questions.

Exercise Questions

  1. What grades are stored in the database?
  2. What emotions may be associated with a poem?
  3. How many poems are in the database?
  4. Sort authors alphabetically by name. What are the names of the top 76 authors?
  5. Starting with the above query, add the grade of each of the authors.
  6. Starting with the above query, add the recorded gender of each of the authors.
  7. What is the total number of words in all poems in the database?
  8. Which poem has the fewest characters?
  9. How many authors are in the third grade?
  10. How many total authors are in the first through third grades?
  11. What is the total number of poems written by fourth graders?
  12. How many poems are there per grade?
  13. How many authors are in each grade? (Order your results by grade starting with 1st Grade)
  14. What is the title of the poem that has the most words?
  15. Which author(s) have the most poems? (Remember authors can have the same name.)
  16. How many poems have an emotion of sadness?
  17. How many poems are not associated with any emotion?
  18. Which emotion is associated with the least number of poems?
  19. Which grade has the largest number of poems with an emotion of joy?
  20. Which gender has the least number of poems with an emotion of fear?

About

SQL practice exercises using a SQLite version of Poems By Kids

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published