Question: ## Objective Your assignment explores the included The Office dataset, in the database table named the_office_dialog. Your task is to create new tables populated with
## Objective
Your assignment explores the included "The Office" dataset, in the database table named "the_office_dialog". Your task is to create new tables populated with reporting data on the dataset using SQL scripts. The database is Postgres.
## Brief
Everyone loves "The Office," a popular show that aired from 2005 to 2013. While doing research, you stumbled across this dataset, with the lines of all the episodes. You decide to explore the dataset and answer some questions by storing the results in new tables that could easily be used by a BI or reporting tool.
## Tasks
Your first task is to create new database tables deployment script for your report data. You will work with these tables for the rest of the challenge. It is up to you how to structure/name/index/test/document the tables, and how many tables to make.
We want you to create tables that can provide pre-computed data and answer for the following questions:
- For all data, What are the names of the characters? How many characters are there?
- For each season, which character has the most lines?
- For each season, what is the number of times a "That's what she said" joke comes up?
- For each season, what is the average percent of lines each character contributed per episode?
- For each character, what is the average number of words per line?
- For each character, what is the most common word?
- For each character, what is the number of episodes where the character does not have a line?
## Instructions
STEP 1: Create your tables/functions by adding new deployments to the existing ones in the `deploy` folder. Add deployments using the `sqitch add` command as follows:
```
sqitch add
```
- Set `
- Set `
- After running the command, new `.sql` files will be added to the `deploy`, `revert`, and `verify` folders.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
