Ask Question

Find all supplier names and cities who supply expensive chairs, where expensive chairs are those whose selling price is greater than $300. Keep in mind this question is about chairs only, not the entire furniture line. (5)

+3
Answers (1)
  1. 14 October, 04:38
    0
    select s. sname from supplier s, product p, supply su where s. s#=su. s# and p. p#=su. p# and p. p_name like 'chairs' and p. price>300

    Explanation:

    First of all, we need to select all the required columns from the specific tables so that the data in those columns can be display by executing this SQL query.

    As the task at hand is to find all supplier names and cities who supply expensive chairs therefore we need to join three tables in order to look for the supplier name selling the highest prices.

    In the above SQL query, the conditons "s. s#=su. s# and p. p#=su. p#" will join tables and the conditons "p. p_name like 'chairs' and p. price>=300" will be used to search for the chair with price greater than $300.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Find all supplier names and cities who supply expensive chairs, where expensive chairs are those whose selling price is greater than $300. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers