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
+2 votes
54.4k views
in Computer by (79.3k points)
edited by

Consider the table SHOPPE given below. Write Command in MySQL for (i) to  (iv) and output for (v) to (vii).                         

                              Table : SHOPPE

Code Item Company Qty City Qty
102 Biscuit Hide & Seek 100 Delhi 10.00
103 Jam Kishan 110 Kolkata 25.00
101 Coffee Nestle 200 Kolkata 55.00
106 Sauce Maggi 56 Mumbai 55.00
107 Cake Britania 72 Delhi 10.00
104 Maggi Nestle 150 Mumbai 10.00
105 Chocolate Cadbury 170 Delhi 25.00

(i) To display names of the items whose name starts with 'C' in ascending order of Price.

(ii) To display code, Item name and City of the products whose quantity is less than 100.

(iii) To count distinct Company from the table.

(iv) To insert a new row in the table Shoppe '110'; Pizza', 'Papa Jones', 120, "Kolkata", 50.0

(v) SELECT Item FROM SHOPPE where Item IN (''Jam" ,"Coffee");

(vi) Select COUNT(distinct(City)) from SHOPPE;

(vii) Select MIN(Qty) from SHOPPE where City ="Mumba";

1 Answer

+3 votes
by (76.4k points)
selected by
 
Best answer

(i) SELECT Item FROM SHOPPE Where Item like 'c%' order by price;

(ii) SELECT Code, Item, City from Shoppe Where Qty < 100;

(iii) SELECT Count(Distinct(Company)) from SHOPPE;

(iv) Insert Into SHOPPE Values (110, 'pizza', 'papa Jones',120,'kolkata',50.0);

(v) Item jam Coffee

(vi) 3

(vii) MIN(QTY) 56

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

...