1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/you-can-generate-a-series-of-dates-in-a-given-range-right-at-the-database-level.md
2022-03-26 20:24:23 +01:00

13 lines
No EOL
650 B
Markdown

---
title: 'You can generate a series of dates in a given range right at the database level'
tweet_id: '1507455559049822208'
thread_slug: weekly-thread-2022-12
author_username: tobias_petry
images:
- 'https://pbs.twimg.com/media/FOih4zwWQAsjZ-E.jpg'
created_at: 2022-03-25T20:33:07+00:00
slug: you-can-generate-a-series-of-dates-in-a-given-range-right-at-the-database-level
---
⚡️ Database Tip
When doing statistical aggregations by time, you may have gaps in your data. You don't have to fill them manually with code! You can generate a series of dates from a start to end time and use these days to join to your statistical data with gaps.