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 foreign key in postgresql?
Can a unique key be a foreign key?
How do I add a primary key in pgadmin?
What is the default postgres database?
Is postgresql better than sql server?
How many columns can a postgres table have?
How the stats updated in postgresql?
Can you have a composite foreign key?
What is postgresql vs mysql?
What is composite foreign key?
How do I start pgadmin 4 on windows?
What is postgresql service?
How to drop a constraint in postgres?
How do I enable postgis on pgadmin?
What type of database is postgresql?