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

PostgreSql Disadvantages

0 Answers   AFDD,


How is the statistics in PostgreSQL updated?

1 Answers  


How to stop database server in postgresql?

0 Answers  


How to create table with timestamp in postgres?

0 Answers  


What do you mean by catalog?

0 Answers  






Does postgresql have a gui?

0 Answers  


What is mvcc in postgresql?

0 Answers  


How do you edit data in pgadmin?

0 Answers  


Where is psql data stored?

0 Answers  


How to drop a constraint in postgres?

0 Answers  


Do foreign keys speed up queries?

0 Answers  


What is a table catalog?

0 Answers  


Categories