Query to Get Highest Marks Output

Question: student marks stable "sp_report"
sid maths chem phy engl
1 33 45 54 48
2 55 32 50 37
3 10 20 30 40
The required o/p is (SQL QUERY TO GET THE BELOW O/P)
sid highest_marks
1 54
2 55
3 40

Showing Answers 1 - 6 of 6 Answers

Neha

  • May 24th, 2016
 

Code
  1.  

  Was this answer useful?  Yes

Ankit

  • Jun 4th, 2016
 

Code
  1. Select sid, max(maths,chem,phy,engl) as marks

  2. FROM stable

  3. Group by sid;

  Was this answer useful?  Yes

Suresh

  • Jun 20th, 2016
 

Code
  1.  

  Was this answer useful?  Yes

Ade

  • Jun 23rd, 2016
 

Code
  1. span style="color: #ff0000;">"highest_marks"

  Was this answer useful?  Yes

Paresh

  • Jun 24th, 2016
 

Code
  1.  

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions