Seussology DB I
Objective
For this assignment, you will demonstrate your skills and understanding of SQL Queries by creating queries that read data from the Seussology Database.
Project Setup
1. Clone the Repository
Clone this repository from GitHub and use the provided file to complete the assignment.
2. Import the Seussology Database
To import the database, using phpMyAdmin, complete the following instructions.
- Open phpMyAdmin at http://localhost/phpmyadmin(Windows) or http://phpmyadmin.test(macOS)
- Log in to phpMyAdmin using the root username and password
- From the phpMyAdmin homepage, click on the "Import" tab found at the top of the page.
- Under the "File to import" section, click the "Choose File" button. Choose the
seussology.sql
file found in this repository. - Click the "Go" button found at the bottom of the page.
- Once the importing has been completed, click on the seussology database, which should appear in the list on the left side of the page.
- With the seussology database selected, click on the "SQL" tab at the top of the page. From this page, you can execute custom SQL commands.
Requirements
Create ONE query for each of the 10 tasks below. The queries should be saved in the queries.sql
file.
categories
table.
1. Retrieve all columns and rows from the book_title
) with the book id (book_id
) of 13 from the books
table.
2. Retrieve the book title (book_title
) and book year (book_year
) from the books
table with the book title (book_title
) of "The Foot Book".
3. Retrieve the book title (book_title
) and book year (book_year
) from the books
table with a book year (book_year
) before 1950.
4. Retrieve the book title (book_title
) from the books
table with the number of pages (book_pages
) greater than 35 and less than 56.
5. Retrieve all the book titles (book_title
) from the books
table that contain the word "you".
6. Retrieve all the book titles (quote
) from the quotes
table that start with the word "Think".
7. Retrieve all the quotes (book_title
) from the books
table when sorted alphabetically.
8. Retrieve the first 10 book titles (book_title
) from the books
table when sorted alphabetically.
9. Retrieve the next 10 book titles (book_title
) and book years (book_year
) from the books
table that have the "Short Stories" category.
10. Using a subquery, retrieve all the book titles (Rubric
Criteria | Pts |
---|---|
Successfully completed task #1 using one query | 2 |
Successfully completed task #2 using one query | 2 |
Successfully completed task #3 using one query | 2 |
Successfully completed task #4 using one query | 2 |
Successfully completed task #5 using one query | 2 |
Successfully completed task #6 using one query | 2 |
Successfully completed task #7 using one query | 2 |
Successfully completed task #8 using one query | 2 |
Successfully completed task #9 using one query | 2 |
Successfully completed task #10 using one query | 2 |
Total | 20 |