So, I have a table where I collect data for the tasks that I do. Each time I create a task, I assign a date to it. The problem with this is the days when I do not have tasks, they are not stored in the database, so when I draw my data, I never see the days when I had zero tasks.
My current request looks like this:
SELECT job_data_date, SUM(job_data_invoice_amount) as job_data_date_income FROM job_data WHERE job_data_date >= '2010-05-05' GROUP BY job_data_date ORDER BY job_data_date;
Conclusion:
| job_data_date | job_data_date_income | | 2010-05-17 | 125 | | 2010-05-18 | 190 | | 2010-05-20 | 170 |
As you can see from the example, the conclusion 2010-05-19 will not be displayed in the results, because it was never stored there.
Is there a way to show missing dates?
Thanks,
Marat
source share