How can I get the average/sum of a column in this query. The query has about 30 records in it, here is the SQL I'm using to get the data out.
SELECT q.SurveyID, q.questionID, q.QuestionScore, q.QuestionName
FROM Questions q
surveyID | questionID | QuestionScore | QuestionName
28323 2 45 Do you like food?
34852 2 88 Do you like food?
38052 2 14 Do you like food?
28323 55 15 Do you like milk?
34852 55 28 Do you like milk?
38052 55 48 Do you like milk?
I want to return one row with an average score here for each questionID. So I'm trying to get just two rows back.
How can I modify my query to do this?