• bsmith 63193 (3/10/2014)


    IT wasn't notified of the project until last minute. An excel spreadsheet was already distributed out to teachers to submit their scores with. It's not the ideal situation, but it's what we have and are trying to work with it. Next year we hope to have a better solution in place. The scores are not for normal grades. I go into the long history of why we are at this point, but that doesn't help solve our issue at hand. I am aware that the data is not clean yet. We will be doing that once we have all of the data imported into SQL.

    I understand how to use the AVG() function in SQL. The part that I am having problems with is finding all duplicate studentID's and then after averaging the results, spitting it out so it only lists the student information once with the averages.

    Using Group By student ID and name, avg() on the other columns, duplicates are averaged.

    If only 1 record, score/count of 1 is the score for that column.

    Add Count(*) as a column and validate some of the data.

    Our you can do a Count(*) on student ID and name, and use a having statement > 1 to see all the dupes.

    Maybe I'm missing something, but you seem to be overthinking some of this.