Question: 1. Consider the following schema: Product(maker, model, type) PC(model, speed, ram, hd, price) Laptop(model, speed, ram, hd, screen, price) Printer(model, color, type, price) The key

1. Consider the following schema:

Product(maker, model, type)

PC(model, speed, ram, hd, price)

Laptop(model, speed, ram, hd, screen, price)

Printer(model, color, type, price)

The key fields are underlined. Write the following queries in SQL:

a. Find the maker of the color printer which has the lowest price among all the color printers (assume coloris a Boolean typed attribute).

b. Find the maker who makes the most number of products.

c. Find the models of PCs which have the highest price among all the PCs of the same speed, the same ram, and the same hd.

2. Consider the following relational schema, where the primary keys are underlined,

Students(sid, sname, address, department_id)

Courses(cid, cname, department_id)

Grades(sid, cid, semester, year, grade)

Write the following query in SQL.

Give all students who selected Database course (cname = Database) in Spring 2018 a 20 percent grade raise (oh, yeah!).

Pictures links if it helps :

https://ibb.co/easuCS

https://ibb.co/jLwbRn

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!