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



(a) Select all the Nonmedical stream students from STUDENT1.

(b) List the names of those students who are in class 12 sorted by Stipend.

(c) List all students sorted by AvgMark in descending order.


Answer =

(a)
select * from student1
where stream = “Nonmedical” ;

(b)
select name from student
where class like “12%”
order by stipend ;

(c)
select * from student1
order by AvgMark desc

18 Comments

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

  1. It helped me complete my homework on time, Thanks

    ReplyDelete
  2. Can you tell the ans : List the names that have grade A sorted by stipend.

    ReplyDelete
    Replies
    1. Select name from student1 where grade = "A" order by stipend ;

      Delete
  3. 4 arrange the record of the class name wise please give me answer

    ReplyDelete
    Replies
    1. Select name , class from student1 order by name ;

      Delete
  4. Display all the students whose grade is 'B' and average marks are less than '70%' . Give me answer.

    ReplyDelete
    Replies
    1. Select* from Student1 wher grade= "B" and AvgMark < 70 ;

      Delete
  5. Display a report listing Name, Stipend, Stream and amount of stipend received in a year assuming that the Stipend is paid every month

    ReplyDelete
    Replies
    1. Select Name, Stipend , Stream ,Stipend * 12 as "Stipend per Year" from STUDENT1 ;

      Delete

Post a Comment

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

Previous Post Next Post