I'm trying to return all the fields from one table, and also the average of a column in another table.
I think the following SQL pretty much shows what I'm trying to accomplish, but it's not working yet:
SELECT Games.*, AVG(Comments.Rating)
FROM Games, Comments
Where Games.GameID = Comments.GameID
GROUP BY Games.GameName
ORDER BY Games.MinAge, Games.BggRating DESC
Please help. I'm a SQL newbie.
Thanks
I think the following SQL pretty much shows what I'm trying to accomplish, but it's not working yet:
SELECT Games.*, AVG(Comments.Rating)
FROM Games, Comments
Where Games.GameID = Comments.GameID
GROUP BY Games.GameName
ORDER BY Games.MinAge, Games.BggRating DESC
Please help. I'm a SQL newbie.
Thanks