This exercise is available at https://study.find-santa.eu/exercises/databases/adventureworks_joins/.
For the sake of the environment, please avoid printing these instructions in the future. Thank you!

SQL Joins (AdventureWorks)

Answer these questions using the AdventureWorks database provided in the sample databases repository. The ERD in the repository shows how the different relations (and, depending on your DBMS, schemata) work together.

Run the following queries (there is more than one way to write most of these queries).

  1. Join (Inner) productmodel, productmodelproductiondescriptionculture, productdescription and culture from the production schema. Return the productmodel name, culture name, and productdescription description ordered by the product model name.
  2. Add a join to previous example to production.product and return the product name field in addition to other information.
  3. Join product and productreview. Include every record from product and any reviews they have. Return the product name, review rating and comments. Order by rating in ascending order.
  4. Use a right join to combine workorder and product from production schema to bring back all products and any work orders they have. Include the product name and workorder orderqty and scrappedqty fields. Order by productid ascending.