mysql – #1241 – Operand should contain 1 column(s)

So!, I was/am writing a subquery to get a value to rating_stars… and I got this (beginner) error…

mysql – #1241 – Operand should contain 1 column(s)

(SELECT value, (sum(value)/count(value)) FROM model_ratings WHERE modelId = id) AS rating_stars

Subquery should return one column, whatever corresponds to rating_stars.

(...) (SELECT (sum(value)/count(value)) FROM model_ratings WHERE modelId = id) AS rating_stars (...)

Leave a Reply

Your email address will not be published. Required fields are marked *

*