📖 Story
Notion · Habit Streak Calendars
Friday morning at Notion's Habit Tracker team. The habit_logs table only gets a row when the app is actually opened that day — a completed habit gets logged as 1, a habit the user opened the app for but chose to skip gets logged as 0, and a day the user never opened the app at all simply has no row whatsoever. Weekly streak calendars need to show all seven days regardless, including the days with no data at all, but habit_logs only ever contains the days something actually happened — there's no table anywhere that already lists 'every day of the week' to join against.