Question: SQL: Schema Consider the following schema: Suppliers(sid, sname, address) Parts(pid, pname, color) Catalog(sid, pid, cost) Questions In a plain text file, write the following queries

SQL:

Schema

Consider the following schema:

Suppliers(sid, sname, address) Parts(pid, pname, color) Catalog(sid, pid, cost)

Questions

In a plain text file, write the following queries in SQL:

  1. Find the names of all suppliers who supply a green part.
  2. Find the names of all suppliers who are from Illinois.
  3. Find the names of all suppliers who sell a red part costing less than $100.
  4. Find the names and colors of all parts that are green or red.

Assumptions

In writing these queries you may make the following assumptions:

  1. Each part has only one color.
  2. The cost field is a real number with two decimal places (e.g., 100.25, 93.00).
  3. The sid field in Suppliers and the sid field in Catalog refer to the same field.
  4. The pid field in Parts and the pid field in Catalog refer to the same field.

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!