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
What is pgadmin used for?
How do I view blob data?
What type of database is postgres?
How to find table creation date in postgresql?
What is the command or the option available in postgresql that can be used to retrieve the next SERIAL value from the sequence object?
What is join and how many types of joins?
Does postgres cache queries?
Is mysql faster than postgresql?
What is bigint in postgresql?
How do I rename a column in postgresql?
What is the purpose of postgresql?
What is postgresql service?
How do you create a table in pgadmin 4?
What is bytea in postgres?
What does create schema do?