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.

7 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Why it will given an error?

    ReplyDelete
    Replies
    1. Because Column is not define in the query.

      Delete
  2. Pls check 3 option

    ReplyDelete
  3. Can you tell me why the output of sum has no decimal places but avg does?

    ReplyDelete
  4. Please tell me if there is no value in the table present then what will it show the output

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post