By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,495 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,495 IT Pros & Developers. It's quick & easy.

How can I select only the rows I need?

P: n/a
This is what the data looks like

id Sort Program Lender Price Rate Cost APR
1 101 10ARMS 1 62,499.00 5.250% -0.450% 6.256%
2 101 10ARMS 2 62,499.00 5.500% -0.875% 6.344%
3 101 10ARMS 3 62,499.00 5.750% -0.750% 6.486%
4 101 10ARMS 4 62,499.00 5.875% -0.893% 6.536%
5 102 10ARMS 2 125,000.00 5.250% -0.560% 6.070%
6 102 10ARMS 1 125,000.00 5.500% -0.875% 6.169%
7 102 10ARMS 3 125,000.00 5.750% -0.750% 6.308%
8 102 10ARMS 4 125,000.00 5.875% -0.893% 6.358%

All I want is from each Unique Sort Value the row where Rate, APR and
Cost are minimized.
For example what I want from the list above is the following;

id Sort Program Lender Price Rate Cost APR
1 101 10ARMS 1 62,499.00 5.250% -0.450% 6.256%
5 102 10ARMS 2 125,000.00 5.250% -0.560% 6.070%

I cannot get it to work but I am not skilled in SQL.

Any help will be greatly appreciated.

Feb 4 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.