Computer Science, asked by vk164437, 5 months ago

Salesman No
Comm
5. Meenal has created a tablo Sales in MySQL shown alongside. She has written
the following queries:
a. SELECT COUNT (Comm) FROM Sales;
b. SELECT COUNT(*) FROM Sales
Explain the output of the two queries given above.
200
T001
800
1002
NULL
1003
800
1004
NULL
1005
IN THE LAB
shown in the table below and write the queries for the following
Table: GARMENTS
10
Category
14
PrCode
Brand Price YearOfManufacture
TROI
Trouser Richlook
4000 2016
SH01 Shirt Peter England
900
2017
TE01
Tie
Richlook
1500 2017
TS01
T-Shirt
Puma
800
2015
TRO2 Trouser
4500 2015
TEO2 Tie
Peter England
1500 2016
a. Display the details of all garments in ascending order of Price
b. Display the Brand and Price of the Category Trouser'.
c. Display the Category and Price of all the products manufactured before 2016.
d. Increase the Price of all the items by 5%.
e. Remove the details of all the garments under Levis brand,
2. Create a table ITEM with Code as the primary key. Decide your own data types. Insert records as shown in the
table below and write the queries to perform the following functions on the table:
Table: ITEM
Code Item Name Company Qly Price
Expiry Date
1002 Cake Britannia 45 200 2018-01-12
1005 Biscuit Britannia 90 100 2017-12-12
1006 Jam
Kissan
34 160 2018-01-23
1001
Jelly Nestle 23 150 2016-11-21
1007 Sauce
Kissan 120 260 2016-02-15
1003
Magsi Nestle 80 100 2017-02-10
1004 Chocolate Cadbury 100 200 2016-12-27
Display the details of the items in ascending order of Code
b. Display Code and itemName of items that have price in the 170 to 250 range,
c. Display the ItemName and Qty of all the products expired in 2016.
d. Increase the price of all the items by Rs. 5
e. Display the various companies listed in the table
Create a table ACTIVITY with Code as the primary key Decide your own data types. Insert records as shown
in the table below and write the queries for the following
Table: ACTIVITY
ACode
Activity Name Stadium Participants Prize Money ScheduleDate
1001
Relay 100x4 Star Annex
16
10000
2017-09-21
1002
High jump
Star Annex 10
12000
2017-09-22
1003
Shot Put
Super Power 12
8000
2017-09-22
1005
Long Jump Star Annex 12
9000
2017-09-21
1008
Discuss Throw Super Power
15000
2017-09-20
1011 Cricket
Kotha
25000
2017-09-22
1012
Football Dhyanchand 18
10000
2017-09-23
1014 Hockey kotla
16
20000 2017-09-21
1017 Lawn Tennis Dhyanchand 4
17000
2017-09-22
a. Display the details of activities in descending order of PrizeMoney.
b. Display the details of ACode 1001, 1005, and 1014
c. Display the Activity Name that has participants in the range 10 to 15
d. Display the sum of PrizeMoney.
e. Display the various stadiums given in the table
4. Create a table CLUB with CoachiD as the primary key Decide your own data types, Insert records as shown
in the table below and write the queries for the following:
Table: CLUB
CoachiD Coach Name Sports DateOfApp Salary
Gender
1001 Ravinder Karate 2001-03-27 56000 M M
1002 Ambika Karate 1998-01-20 30000
F
1003 Nitin
Squash 1998-02-19 35000
M
1004 Rohit
Basketball 1999-04-23 40000
M
Mohan
1005
1998-02-24
M
Swimming
30000
1006
F
45000
Swimming
Saumya
2001-01-22
1007
F
56000
Karate
Garima
2010-02-27
35000
Basketball
1008
F
2010-05-29
Shailja
233
232
1. Create a table GARMENTS with PrCode as the primary key Decide your own data types. Insert records as​

Answers

Answered by mohammad6641
2

Explanation:

give me star and like because 30 min your question has taken of my

Answered by arunbhai1234
0

Answer:

what is this bro sorry ok

Similar questions