Missing entries in join
Another way, that doesn't use dynamic SQL would be to first CROSS JOIN the period with a (derived) table that holds DISTINCT name values from tt and then LEFT JOIN tt:

SELECT 
    period.end,
    n.name,
    IFNULL(SUM(tt.punkte), 0) AS punkte
FROM  
        period 
    CROSS JOIN 
        ( SELECT DISTINCT name FROM tt ) AS n 
    LEFT JOIN 
        tt 
    ON 
       tt.name = n.name 
       AND (tt.zeit &lt; period.end AND tt.zeit &gt;= period.start) 
GROUP BY
    period.end,
    n.name ;