I have a table like
Table ratings : int UserID, int CommentID, int Rating
and I know that the following query can get the average rating and the number of times a comment has been rated. How can I expand this statement to return a value to indicate whether or not the current user has already rated the comment, assuming I know the user's ID number?
SELECT count(*), AVG(rating) FROM ratings where commentID=#
Thank for any help,
K