Sick of my SQL questions yet? 
Ok, one table(actually it's a view), 10 columns, 10 rows
columns are named id, Q1, Q2, ... Q9
values in the fields are 1 - 10 for Qn fields, and a five digit idNumber for the id field
The view is already filtered from a bigger table so that any entry in the view has a value of 10 for Q1
What I now want to do it to pick out the best entry of the view, and here's how I should figure it:
Average together all the values from the other 8 columns, and whatever value is the highest, that is the one that I want, and I'll be needing the id -- so that I can match it back to the corresponding account from another table.
I'm thinking some combination of a MAX and an AVG function... but that's why I'm here... I'm not sure, and have been floundering on it for a few too many minutes. ;-)
And thanks for any help (as always!)
Paul Prewett
Ok, one table(actually it's a view), 10 columns, 10 rows
columns are named id, Q1, Q2, ... Q9
values in the fields are 1 - 10 for Qn fields, and a five digit idNumber for the id field
The view is already filtered from a bigger table so that any entry in the view has a value of 10 for Q1
What I now want to do it to pick out the best entry of the view, and here's how I should figure it:
Average together all the values from the other 8 columns, and whatever value is the highest, that is the one that I want, and I'll be needing the id -- so that I can match it back to the corresponding account from another table.
I'm thinking some combination of a MAX and an AVG function... but that's why I'm here... I'm not sure, and have been floundering on it for a few too many minutes. ;-)
And thanks for any help (as always!)
Paul Prewett