title: Retrieve missing dates from database via MySQL
body: <p>So I have a table where I collect data for the jobs that I do. Each time I create a job I assign it a date. The problem with this is the days I don't have jobs aren't stored in the database therefore when I graph my data I never see the days that I had zero jobs.</p>
  
  <p>My current query looks like this:</p>
  
  <pre><code>SELECT job_data_date, SUM(job_data_invoice_amount) as job_data_date_income 
  FROM job_data 
  WHERE job_data_date &gt;= '2010-05-05' 
  GROUP BY job_data_date 
  ORDER BY job_data_date;
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>|   job_data_date   |   job_data_date_income    |
  |   2010-05-17      |   125                     |
  |   2010-05-18      |   190                     |
  |   2010-05-20      |   170                     |
  </code></pre>
  
  <p>As you can see from the example output the <code>2010-05-19</code> would not show up in the results because it was never stored there.</p>
  
  <p>Is there a way to show the dates that are missing?</p>
  
  <p>Thank you,</p>
  
  <p>Marat</p>