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 |
tinamiller1
Yak Posting Veteran
78 Posts |
Posted - 2009-05-15 : 16:04:26
|
I am going to try an alternate approach to my question. I have 2 tables. 1 table lists all my tax ids. The other table lists the tax ids along with market mapping and 2008paper volumes.my goal is to get the top 25 tax ids by market mapping with 2008paper volumes in desc order. so my final results would have:all distinct taxids and only 25 per market mapping.111111 alabama 90000222222 alabama 70000333333 alabama 65000444444 arizona 100000555555 arizona 95000666666 arizona 80000I have over 643k tax ids in the table. the market mapping is technically by state. the 643k tax ids are already distinct and there isn't the same tax id in alabama as is in arizona. all i want to know is my top 25 tax ids per state basically to make it easier to understand and the top 25 will be descending order by their paper volume. i found 1 example but i tried it and it didn't work for me.tina m miller |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-05-26 : 18:18:18
|
What did you find and try?Does it include SELECT TOP 25 *FROM ...ORDER BY SomeValue DESC E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|