Question: We will use a GitHub project that translated the database for use in Postgres. You must import the data into your Postgres instance by creating

We will use a GitHub project that translated the database for use in Postgres. You must import the data into your Postgres instance by creating a new database and running the northwind.sql file against that database.
You may simply run the create_db.sh script on MacOS, Linux, or WSL/bash. Without a bash shell available, you must use the techniques from previous SQL assignments to manage your database. Note that for our purposes, some of the commands in the script are not completely necessary. (This isn't necessary)
Write SQL queries for the following questions, stored in a .sql file to be turned in:
1. What is the full name, full address, title, and phone number for all employees currently living in a US state that shares a border with the Pacific Ocean?
2. Give the same information for all employees not in the USA but are older than 50 years of age.
3. Which employees (last name, first name without repeats) have placed orders delivered to Norway?
4. What is the title and name of any employee that has sold at least two of either "Vegie-spread" or "Sir Rodneys Marmalade"?
5. What are the Employee IDs for all employees who have sold more than 70 products?
6. List the last name of all employees that live on the same city as their managers.
7. List the product names of all products that were bought OR sold by people who live in London (use a UNION).
8. What is the average price of products for each category? Output just the average price as "average_price" and the category ID.
 We will use a GitHub project that translated the database for

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!