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



i have three table 1. student (stuid,name) 2. subject (subid,sname,studid) 3. marks (subid,stude..

Answer / 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

More Postgre Interview Questions

How to create a PostgreSQL user?

1 Answers  


Is postgres is free?

0 Answers  


What is edb postgres?

0 Answers  


How to call postgresql function in asp net?

0 Answers  


Explain about Triggers?

1 Answers   Infosys,






Does postgres have clustered index?

0 Answers  


What is connection limit in postgresql?

0 Answers  


Can you have a composite foreign key?

0 Answers  


Is postgresql relational?

0 Answers  


What is the default database in postgresql?

0 Answers  


Is postgresql a language?

0 Answers  


What does postgresql do?

0 Answers  


Categories