0

I' m trying to find names of students who got same rank,i need query please Thanks in advance

i have Student table with respective columns::::: Student names: A,B,C,D,E Mark's:100,200,100,300,200 Rank:3,2,3,1,2 expected result: Student names marks rank A 100 3 C 100 3 B 200 2 E 200 2

8th Dec 2019, 3:57 PM
vijay
vijay - avatar
3 Antworten
+ 1
vijay , sorting records based on marks field will give desired result. SELECT student_name , marks, rank FROM student ORDER BY rank;
8th Dec 2019, 4:12 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 1
vijay , You are welcome. I can directly tell you query but that will not actually help you to learn. This looks more of homework to me. I'll just provide a hint now. Observe the desired output carefully. It has all records which have `marks` less than 300. You can easily modify previous query to get necessary output . Use where class to add a condition on select statement. Try to learn on your own first. your efforts matter more than anything else. https://www.tutorialspoint.com/sql/sql-where-clause.htm
8th Dec 2019, 4:28 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
0
Thanks Omkar, I have modified my expected result,can you look at it again
8th Dec 2019, 4:16 PM
vijay
vijay - avatar