Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

database mysql subquery, outer query part table: create table part (partnum nume

ID: 3794753 • Letter: D

Question

database mysql

subquery, outer query

part table:

create table part
(partnum numeric(10) not null,
description varchar(20) not null,
price decimal(10,2) not null);

insert into part values
('54', 'PEDALS', '54.25');

insert into part values
('42', 'SEATS', '24.50');

insert into part values
('46', 'TIRES', '15.25');

insert into part values
('23', 'MOUNTAIN BIKE', '350.45');

insert into part values
('76', 'ROAD BIKE', '530.00');

insert into part values
('10', 'TANDEM', '1200.00');

2. Write a query that shows the name of the most expensive part.

Explanation / Answer

sol:select description ,MAX(price) AS "max price" from part GROUP BY description;

this above query will give you the max price of the following parts