Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Compose an SQL statement to show a list of two least expensive vendors (suppliers) for each raw material. In the result table, show Material ID,

image text in transcribedCompose an SQL statement to show a list of two least expensive vendors (suppliers) for each raw material. In the result table, show Material ID, Material Description, Vendor ID, Vendor Name, and Suppliers unit price. Sort the result table by Material_ID and unit price in ascending order. Note: if a raw material has only one supplier(vendor), that vendor should also be in the result (output) table [hint: use a correlated sub query].

Salesperson t Sales territory t Salesperson ID Territory ID Salesperson name Temitory description Salesperson telephon Salesperson fax erritory ID Order line t rder ID Product Line t uantity Product Line ID roduct ID Product Line Name roduct Name Product Finish nit Price hand Vendor t Product Description Work Center t endor ID Product Line ID Work Center ID Vendor name Work Center ID tion Vendor address tate ostal Code Uses t Product ID Raw Materials t Supplies t Material ID Material ID Vendor ID tage ckness Material ID nit price ade Material descriptio Footage on hand nit price Does Business in t Territory ID Customer ID Order t der ID der Date customer ID Works in t Work Center ID mployee ID Skills t kill ID Skill Description Low pay/hour High pay/hour customer t Customer ID Customer name Customer address te tal Code Employee t mployee ID Employee name Employee Address tate ostal Code Supervisor ID red Date Employee Skills mployee id

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

Q.1. Health issues caused by adulteration data ?

Answered: 1 week ago

Question

1. Traditional and modern methods of preserving food Articles ?

Answered: 1 week ago

Question

What is sociology and its nature ?

Answered: 1 week ago

Question

What is liquidation ?

Answered: 1 week ago