Du skal bruge left join
i stedet for right join
eller du kan også ændre placeringen af tabeller
SELECT sum(steps), date(from_unixtime(td.db_date)) as stepdate
FROM time_dimension td
LEFT JOIN userdata u
ON date(from_unixtime(u.in_date)) = td.db_date
WHERE user_id = 8
GROUP BY date(from_unixtime(td.db_date))
ORDER BY stepdate DESC;
Dette forudsætter dog time_dimension
bord, der behandles som kalenderbord.