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

What is postgresql written in?

0 Answers  


What is postgres default password?

0 Answers  


Is postgres a database?

0 Answers  


Does creating a foreign key create an index?

0 Answers  


Where is pg_hba conf?

0 Answers  






What is the option used in PostgreSQL to increase the number of shared memory buffers shared among the backend processes

0 Answers  


What is serial data type in postgresql?

0 Answers  


What is write ahead logging in postgresql?

0 Answers  


Why are stored procedures used?

0 Answers  


What is postgres process?

0 Answers  


What is shared_buffers postgresql?

0 Answers  


How do I alter a table in postgresql?

0 Answers  


Categories