I've got a table with users and their score, a decimal number ranging 1 - 10. Table(user_id, score) I also have a 1 row query with the average of the scores (about 6), and the standard deviation (about 0.5). I use MS Access 2007.
I want to label the users A, B, C, D, where:
- A has a score higher than (avg+stdev);
- B has a score lower than A, but higher than the average;
- C has a score lower than the average, but higher than (avg-stdev)
- D has a score lower than (avg-stdev).
If I export all data to Excel, I can calculate the values easily, and import them back to the database. Obviously, this isn't the most elegant way. I would like to do this with SQL as a Query. The result should be a table (user_id, label)
But how?