How do I query a table and get the ranking of records based off of multiple ranked records?
Posted on 2011-03-13
I have a table that has several records of ranks. The ranking can be 0-5.
So my table is like so...
record_ID | project_ID | ranking | date |
1. record ID is just Auto Incremented
2. project_ID is a random number and can have multiple records of the same Project_ID
3. ranking can be 0-5 (0 = no points, 5 = Highest points).
4. And the date
I need for the query to COMBINE the records with the same project_ID and ORDER each combined record by the AVERAGE ranking (5 being first).
I've written some basic/intermediate SQL queries but this one is giving me some trouble.