i have three table
1. student (stuid,name)
2. subject (subid,sname,studid)
3. marks (subid,studentid,marks)
i want the reslut of how as got max marks in each subject

sudentname,max(marks), name
abc,70,nikitha

Answer Posted / somnath banerjee

select (select studentname from student where stuid=a.studentid) as studentname,marks,(select sname from subject where subid=a.subid) as name from (select subid,studentid,max(marks) from marks group by subid,studentid) a;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is shared buffer in postgres?

540


Provide an explanation about write ahead logging?

576


How many columns can a postgres table have?

580


How do I alter a table in postgresql?

565


What is difference between postgresql and mysql?

611






Which is better mysql or postgresql?

573


What is stack builder?

575


What is pg pool?

596


What is the use of geoserver?

575


How do I connect to postgresql access?

607


Is postgresql cloud based?

558


Does postgres cache queries?

574


How do I add one column in postgresql?

578


What is the index key?

678


What is instance in postgresql?

612