try:
SELECT a.id, d1, d2, d3
FROM (([select id from tb union select id from ts union select id from tg]. AS a LEFT JOIN [select id,sum(day1) as d1 from tb group by id]. AS b ON a.id=b.id) LEFT JOIN [select id,sum(day2) as d2 from ts group by id]. AS c ON a.id=c.id) LEFT JOIN [select id,sum(day3) as d3 from tg group by id]. AS d ON a.id=d.id;