I haven't been playing with SQL for a while and I lost the hang of it. I have this query
INSERT INTO company_reports (
company_id, quarter, leftover, produced,
sold, price, cost, income,
expenses, profit, dividends
) SELECT
ct.id, 5, c.leftover, ct.produced,
ct.sold, c.price, c.cost, ct.sold*c.price,
ct.produced*c.cost,
ct.sold*c.price-ct.produced*c.cost,
(ct.produced*c.cost, ct.sold*c.price-ct.produced*c.cost) * c.dividends
FROM companies_tmp ct
INNER JOIN companies c
ON ct.id = c.id;
And for some reason, my MySQL tells me this
#1241 - Operand should contain 1 column(s)
I have no idea what ´operand´ means in this context.
Any ideas?