Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started