Jeg tror, det er en ret simpel join-, sum- og grouped by:
SELECT t.r_id, SUM(t.work) work_sum
FROM tasks t
JOIN info i
ON i.id = t.r_id
AND i.date BETWEEN xxx AND yyy
GROUP BY t.r_id
Hvis du vil have en null work_sum for opgaver uden information i det interval:
SELECT t.r_id, SUM(t.work) work_sum
FROM tasks t
LEFT JOIN info i
ON i.id = t.r_id
AND i.date BETWEEN xxx AND yyy
GROUP BY t.r_id
Hvis du vil have 0 work_sum for opgaver uden info i det interval:
SELECT t.r_id, COALESCE(SUM(t.work),0) work_sum
FROM tasks t
LEFT JOIN info i
ON i.id = t.r_id
AND i.date BETWEEN xxx AND yyy
GROUP BY t.r_id