Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Consider the following schema: Suppliers(sid: integer, sname: string, address: string) Parts(pid: interger, pname: string, color: string) Catalog(sid: integer, pid: integer, cost: real) The Catalog

1. Consider the following schema:

Suppliers(sid: integer, sname: string, address: string)

Parts(pid: interger, pname: string, color: string)

Catalog(sid: integer, pid: integer, cost: real)

The Catalog relation lists the prices charged for parts by Suppliers. Write the following queries in SQL:

ANSWER ALL PLEASE

(a) Increase price of all green parts by 5% sold by supplier named Gordon. [Hint: update]

(b) Find pnames of parts for which there is some suppliers.

(c) Find the names of the suppliers who supply a red part that costs less than 100 dollars. (Hint: nested subquery)

(d) For every suppliers, print sid, name and price of the most expensive part that she supplies. [HItns: Group by]

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

Students also viewed these Databases questions

Question

Explain in detail how the Mughal Empire was established in India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I - -[ze dx

Answered: 1 week ago

Question

3. How would you address the problems that make up the situation?

Answered: 1 week ago