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 |
|
hug
Starting Member
11 Posts |
Posted - 2000-11-06 : 05:27:46
|
| When you use the min() or max() how do you find the value of the other fields in the table for the resulting min/max value.When aggregating information it makes no sense to be able to see the other fields for a count, sum or avg. But for min and max it does.table A( id, price, code)how would you return the code for the min(price) record in each group. eg.1 , $12, bbbb1 , $11, aaaa1 , $10, cccc2 , $10, aaaa2 , $11, ddddyou would want the results to be 1, $10, cccc2, $10, aaaaHow can this be done ?Edited by - hug on 11/06/2000 16:14:30 |
|
|
|
|
|
|
|