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 |
ASPSQLVB
Starting Member
46 Posts |
Posted - 2007-01-08 : 20:08:33
|
Gang, I am trying to select the TOP 3 anglers with the most in totalweight. TotalWeight is a column in the TotalWeight Table.Below is the SQL statment I have.Thank You.SELECT TOP 3 Fish.*, BigFish.*, FishAngler.*, TotalWeight.* FROM BigFish INNER JOIN FishAngler ON BigFish.FishId = FishAngler.FishId INNER JOIN Fish ON FishAngler.FishId = Fish.FishId INNER JOIN TotalWeight ON FishAngler.FishId = TotalWeight.FishId |
|
Kristen
Test
22859 Posts |
Posted - 2007-01-08 : 20:21:34
|
Does addingORDER BY TotalWeight.TotalWeight DESCget what you want?Kristen |
 |
|
ASPSQLVB
Starting Member
46 Posts |
Posted - 2007-01-08 : 20:50:00
|
Yes id Does. Thank You Kristen. Enjoy!! |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-01-08 : 22:31:52
|
I caught a 320 lb shark in the Indian Ocean many years ago - would that make the top 3? |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-09 : 04:52:27
|
My best catch ever was two years ago. 128 lb girlfriend...Peter LarssonHelsingborg, Sweden |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-01-09 : 04:58:12
|
Oh does this mean, Kristen's 320lb shark is his . . . . . .  KH |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-01-09 : 06:01:04
|
Peter is you girlfriend reading this by any chance? she's be both pissed and pleased with you right now  Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-09 : 08:15:59
|
Sometimes she leans over and read my posts here.Oh, you mean about the weight? It is 60 kg, which is quite normal here in Sweden (actually lower limit).Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|