Q. Write SQL commands for the following on the basis of given table GRADUATE:



(a) List the names of those students who have obtained Rank 1 sorted by NAME.

(b) Display a report, listing NAME, STIPEND, SUBJECT and amount of stipend received in a year assuming that the STIPEND is paid every month.


Answer  =

(a)
Select name from GRADUATE
Where Rank = 1
Order by NAME ;

(b)
Select name ,stipend , subject , stipend * 12 as stipend_in_year  from  graduate ;

12 Comments

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

  1. in (i) there should be display name not * . bcz it it asking for displaying name not all info

    ReplyDelete
  2. Great work by you guys really very grateful for this

    ReplyDelete
  3. In 2 question after * why you have writen "12 as stipend_in_year"

    ReplyDelete
    Replies
    1. I have multiply it with 12 for finding it for year.

      Delete
  4. in q 2 there would be written as stipend*12 as "annual stipend" means in inverted comma as there is more than 2 word

    ReplyDelete
    Replies
    1. I have written stipend_in_year , these are connect by _ (Underscore) so, it need not to use comma

      Delete
  5. Great work by you guys really very grateful for this

    ReplyDelete
  6. stipend * 12 what it means ?

    ReplyDelete

Post a Comment

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

Previous Post Next Post