***SQL DML*** Write SQL statements to answer the following questions. Note that
ID: 3775765 • Letter: #
Question
***SQL DML***
Write SQL statements to answer the following questions. Note that you do not need data tuples to answer these questions. Use the following relational schema.
Supplier (sid, name, status, city)
Part (pid, name, color, weight, city)
Job (jid, name, city)
Supplies (/sid/, /pid/, /jid/, quantity)
Use subquery, what are the id and the name of all suppliers, whose total quantity is larger than the total quantity of all suppliers in city ‘London’?
Supplier (sid, name, status, city)
Part (pid, name, color, weight, city)
Job (jid, name, city)
Supplies (/sid/, /pid/, /jid/, quantity)
Explanation / Answer
select s.sid , s.name , p.quantity from suppleir s, supplies p where
p.quantity > (select q.quantity from supplies q , supplier a where a.city = 'London');
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.