storing intermediate computations? (2 replies)
(MySQL.com) Consider the following query for computing a weighted average:
SELECT a.x0, a.x1, a.name,
SUM(USERFN(a.x0, a.x1, b.x0, b.x1) * b.y) /
SUM(USERFN(a.x0, a.x1, b.x0, b.x1)) AS avg
FROM b
INNER JOIN a ON b.x0 < a.x1 AND b.x1 &
Update update feed set failed_fetches=0, fetched=current_timestamp() where feed_id = 1268 failed: 1142 [UPDATE command denied to user '334187_hdlns_ms5'@'10.187.248.89' for table 'feed'] in [update feed set failed_fetches=0, fetched=current_timestamp() where feed_id = 1268]
updated 1268 (MySQL User Forums), inserted 30, updated 0, at 2012-06-01 21:50:35