Q. Give the following table:-
Give the output of following SQL statements :
(i) SELECT MIN(AvgMark) FROM STUDENT WHERE AvgMark < 75 ;
(ii) SELECT SUM(Stipend) FROM Student WHERE Grade = 'B' ;
(iii) SELECT AVG(Stipend) FROM Student WHERE Class = '12A' ;
(iv) SELECT COUNT(DISTINCT) FROM Student ;
Answer :-
(i)
MIN(AvgMark |
64.40 |
(ii)
SUM(Stipend) |
1150.00 |
(iii)
AVG(Stipend) |
475.00 |
(iv)
It will give an error.
Why it will given an error?
ReplyDeleteBecause Column is not define in the query.
DeletePls check 3 option
ReplyDeleteIt is correct.
DeleteCan you tell me why the output of sum has no decimal places but avg does?
ReplyDeleteAll answers are in decimal.
DeletePlease tell me if there is no value in the table present then what will it show the output
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )