Question: Consider a database ( suppliers - parts - projects ) with the following schema: S ( S# , SNAME, STATUS, CITY ) P ( (
Consider a database supplierspartsprojects with the following schema:
S S# SNAME, STATUS, CITY
P # PNAME, COLOR, WEIGHT, CITY
# JNAME, CITY
SPJ S# P# J# QTY
Suppliers parts P and projects J are uniquely identified by supplier number S part number # and project number J# respectively. Below are some sample data of the database.
tabless#SNAME,SPJs#P##QTYSTATUSCITY,ssmith,London,,,JSJones,Paris,,,sPJsBlake,Paris,,,sPJSClark,London,,,sPJsAdams,Athens,,,sPJSPJdots,cdots,cdots,,,SPJPP#PNAME,COLOR,WEIGHT,CITY,,sPJcdots,cdots,,,,sPJPNut,Red,London,,SPPBolt,Green,Par,,sPJPScrew,Blue,Rome,,SPJPScrew,Red,London,,SPJPCam,Blue,Paris,,SPJPcog,Red,London,,SPSPJSPJJJ#JNAME,CITY,,,,SPJSPJJSorter,Par:,,,,$PJJPunch,Rome,,,,SPJReader,Athe,ens,,,SPJJConsole,Athe,ens,,,SPJJCollator, Lonc,ion,,,SPJJTerminal,Oslc,,,,,,,Tape,Lor,ion,,,,,,
Please complete the following questions with SQL SELECT statement The SQL statements are required in the following questions. Students can also utilize the data to test their SQL statements in their computers though the testing is optional in this assignment
Get part numbers for parts supplied by a supplier in London to a project in London.
Get all pairs of city names such that a supplier in the first city supplies a project in the second city.
Get the total number of projects supplied by supplier S
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
