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

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -