Chapter 7 Querying using SQL Solutions
Chapter 7 Querying using SQL Solutions
CHAPTER 7
TYPE A
Answer 3 – SELECT * FROM STUDENT ORDER BY PROJECTGROUP, SECTION,
MARKS;
TYPE B
Answer 9 (d) 95
Answer 10
(i)
COUNT (DISTINCT SPORTS)
4
(ii)
MIN(Age)
34
Page 1 of 5
(iii)
AVG(Pay)
1100.0
(iv)
SUM(Pay)
7800
Answer 11
(i)
MIN(AvgMark)
64.4
(ii)
SUM(Stipend)
1150
(iii)
AVG(Stipend)
475.0
(iv)
ERROR
Answer 12
(i) SELECT EMPLOYEEID , NAME , EMPLOYEE.JOBID , JOBTITLE FROM
EMPLOYEE NATURAL JOIN ON JOB ;
(iv) JOBID
Page 2 of 5
Answer 16 SELECT Deptno, COUNT(*) FROM EMPL GROUP BY Deptno ;
Deptno COUNT(*)
10 3
20 5
30 6
Answer 19 ERROR
Answer 22 ERROR
Answer 27
(i) 2610
(ii)
DESCRIPTION TYPE
Page 3 of 5
INFORMAL SHIRT COTTON
INFORMAL PANT COTTON
FORMAL PANT TERELENE
(iii) F04
(iv) 7
Answer 28
(i)
Bangalore
Delhi
Mumbai
(ii)
Manufacturer MAX(Price) MIN(Price) Count(*)
ABC 55 45 2
LAK 40 40 1
XYZ 120 95 2
(iii)
ClientName Manufacturer
Cosmetic Shop ABC
Total Health ABC
Live life XYZ
Pretty Woman XYZ
Dreams LAK
(iv)
Product Name Price * 4
Talcom Powder 160
Face Wash 180
Bath Soap 220
Shampoo 480
Face Wash 380
Answer 29
(i)
DISTINCT City
Delhi
Mumbai
Bangalore
(ii)
ItemName Max (Price) Count ( * )
Personal Computer 37000 3
Laptop 57000 2
Page 4 of 5
(iii)
CustomerName Manufacturer
N Roy PQR
H Singh XYZ
R Pandey COMP
C Sharma PQR
K Agarwal ABC
(iv)
ItemName Price*100
Personal Computer 3500000
Laptop 5500000
Answer 30
(i)
SenderCity
Mumbai
New Delhi
(ii)
A.SenderName B.RecName
R Jain H Singh
S Jha P K Swamy
(iii)
RecName RecAddress
S Mahajan 116, A Vihar
S Tripathi 13, Bl D, Mayur Vihar
(iv)
RecID RecName
ND08 S Mahajan
ND48 S Tripathi
Page 5 of 5