Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jutiyi
Starting Member
9 Posts |
Posted - 2008-02-27 : 06:19:17
|
| How to implement in sql for the followingtable Researcher - ID,NameReseachPaper - ResearchPaperID, MemberID Select top three research whose produce most research paperThanks.. |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2008-02-27 : 06:45:18
|
| What have you tried so far?[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQL or How to sell Used CarsFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-27 : 06:59:19
|
quote: Originally posted by jutiyi How to implement in sql for the followingtable Researcher - ID,NameReseachPaper - ResearchPaperID, MemberID Select top three research whose produce most research paperThanks..
Join the two tables based on common field and find the number of papers occuring for a single Research (you have a function called COUNT() to do this). Take only the topmost 3 records based on count value. (you have TOP & ORDER BY clauses to do this). Now try to write the query and let us know how you got on. |
 |
|
|
|
|
|