Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
101k views
in Computer by (79.0k points)

Consider the following table FITNESS with details about fitness products being sold in the store. Write command of SQL for (i) to (iv) and output for (v) to (viii).

                             Table : FITNESS

PCODE PNAME PRICE MANUFACTURER
P1 Treadmill 21000 Coscore
P2 Bike 20000 Aone
P3 Cross Tiainer 14000 Reliable
P4 Multi Gym 34000 Coscore
P5 Massage Chair 5500 Regrosene
P6 Belly Vibrator Belt 6500 Ambaway

(i) To display the names of all the products with price more than 20000.

(ii) To display the names of all the products by the manufacturer "Aone".

(iii) To change the price data of all the products

by applying 25% discount reduction.

(iv) To add a new row for product with details: "P7","Vibro Exerciset", 28000,'Aone".

(V) SELECT * FROM FITNESS WHERE MANUFACTURERNAME, LIKE " % e" .

(vi) SELECT COUNT((DISTINCT)MANUFACTURER) FROM FITNESS.

(vii) SELECT MAX(PRICE) FROM FITNESS.

1 Answer

+1 vote
by (76.3k points)
selected by
 
Best answer

(i) SELECT PNAME, PRICE FROM FITNESS WHERE PRICE > 2000;

(ii) SELECT PNAME FROM FITNESS WHERE MANUFACTURER = "Aone";

(iii) UPDATE FITNESS SET PRICE=PRICE * (PRICE*0.25);

(iv) INSERT INTO FITNESS VALUES("P7", "Vibro Exerciser", 28000, "Aone");

(v) Error: There is no column MANUFACTURER NAME

PCODE PNAME PRICE MANUFACTURER
P1 Treadmill 21000 Coscore
P2 Bike 20000 Aone
P3 Cross Trainer 14000 Reliable
P4 Multi Gym 34000 Coscore
P5 Massage Chair 5500 Regrosene

(vi) COUNT(DISTINCT(MANUFACTURER)) 5

(vii) MAX(PRICE) 6500

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...