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:
- Find the names of all suppliers who supply a green part.
- Find the names of all suppliers who are from Illinois.
- Find the names of all suppliers who sell a red part costing less than $100.
- Find the names and colors of all parts that are green or red.
Assumptions
In writing these queries you may make the following assumptions:
- Each part has only one color.
- The cost field is a real number with two decimal places (e.g., 100.25, 93.00).
- The sid field in Suppliers and the sid field in Catalog refer to the same field.
- 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
Get step-by-step solutions from verified subject matter experts
