AVG/COUNT MySQL query NOT working -


I'm not experiencing much in MySQL queries so I'm doing something wrong. My query is simple like this:

  SELECT item. *, AVG (itemRating.rating) As a 'rating' in the form of 'rating' as item (itemRating.rating), item is sending WHERE item ID IN (...) and itemRating.item_fk = Item.id GROUP Item Rating.item_fk   

This works fine when no item is rated (no record table in item). Can anybody solve me without losing this information?

  select item.id, avg (ItemRating.rating) the form of 'rating' In the item number, item number (ItemRating.rating) is included as 'Ratingcard' items leaving item rating.item_fk = item.id WHERE item.id IN (...) item.id by Group    

Comments

Popular posts from this blog

Out of index C/C++ -

regex - PatternSyntaxException: while using String.ReplaceAll function in java? -

java - Projects which are accessed via multiple (different) IDEs: Ant or Maven? -