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 / 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 |
Is postgres distributed?
What is psql?
What is sequence in postgresql?
How to get the ddl of a table in postgresql?
How do I view blob data?
What is a postgresql cluster?
What language is postgresql written in?
What is the command or the option available in postgresql that can be used to retrieve the next SERIAL value from the sequence object?
Are postgres table names case sensitive?
How do you remove a foreign key constraint?
What is pg_catalog in postgres?
What is the option used in PostgreSQL to increase the number of shared memory buffers shared among the backend processes