Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is foreign key in postgresql?

908


Can a unique key be a foreign key?

834


How do I add a primary key in pgadmin?

839


What is the default postgres database?

857


Is postgresql better than sql server?

933


How many columns can a postgres table have?

798


How the stats updated in postgresql?

976


Can you have a composite foreign key?

810


What is postgresql vs mysql?

866


What is composite foreign key?

738


How do I start pgadmin 4 on windows?

889


What is postgresql service?

953


How to drop a constraint in postgres?

837


How do I enable postgis on pgadmin?

976


What type of database is postgresql?

840