Consider the following schema: #Suppliers(sid: integer, sname: string, address: string) #Parts(pid: integer, pname: string, color: string) #Makers(mid: integer, mname: string) #Catalog(sid: integer, pid: integer, mid integer,cost: integer) It is created using following CREATE TABLE Suppliers ( sid integer NOT NULL, sname varchar (25) NOT NULL, address varchar (25), PRIMARY KEY (sid) ); CREATE TABLE Parts ( pid integer NOT NULL, pname varchar (25) NOT NULL, color varchar (25) NOT NULL, PRIMARY KEY (pid) ); CREATE TABLE Makers ( mid integer NOT NULL, mname varchar (25) NOT NULL, PRIMARY KEY (mid) ); CREATE TABLE Catalog ( sid integer NOT NULL, pid integer NOT NULL,mid integer NOT NULL, cost integer, PRIMARY KEY (sid,pid,mid), FOREIGN KEY (sid) REFERENCES Suppliers(sid), FOREIGN KEY (pid) REFERENCES Parts(pid), FOREIGN KEY (mid) REFERENCES Makers(mid) ); Here sid is the primary key for Suppliers, pid is the primary key for Parts, and (sid, pid, mid) together form the primary key for Catalog. The Catalog relation lists the prices charged for parts. Parts.color can take values "Red", "Blue", "Yellow" etc. Write one SQL query to find the sids of suppliers who supply all color "Red" parts in the table Parts. Please type your answer. 论述题
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
类似问题
Name the Supreme Court decision that removed financial constraints on PACs.
Political scientists Joshua Kalla and David Broockman find that senior policy makers made themselves available to _____ between three and four times more often than they did to constituents.
Name the political scientist who argues that parties are designed to serve the needs of ambitious politicians (namely candidates and officeholders).
Name the political scientist who said this famous quote about the problems of pluralism: “The flaw in the pluralist heaven is that the heavenly choir sings with a strong upper-class accent.”
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!