I need a query to select comments whose average rating fall within a specified range (x1 to x2)
Relevant fields:
Comments table: id, comment, user_id, date_added (need to select these 4)
ratings table: comment_id, user_id, rating (based on the average rating of a comment from this table)
How do I construct the WHERE clause of the query to find the average for each unique column_id? (i.e. WHERE AVG(rating for a comment) BETWEEN x1 AND x2)
-- K