How can I multiply numbers (data) in one column in MySQL?
2 answers
I don't know the function of multiplying the aggregate. However, in the case of a column containing only zeros and ones, the product will be the same only if each value is equal to one, otherwise it will be equal to zero:
SELECT
CASE WHEN SUM(status) = COUNT(status) THEN 1 ELSE 0 END AS product
FROM yourTable
+1
source to share