title: Select a default for missing rows in mysql
body: <p>I have a simple table to keep count of the number of visitors on a website.</p>
  
  <pre><code>|Day|Visitors|
  |1  |2       |
  |2  |5       |
  |4  |1       |
  </code></pre>
  
  <p>I want to select the number of visitors per day for days 1 to 4, but I also want a value for day 3. Since day 3 is missing, I wonder if it is possible to select all integers in a range, and if the column is missing, a default is to be returned. A simple "SELECT visitors FROM table WHERE day >= 1 AND day &lt;= 4 ORDER By day" query will return "2, 5, 1", but the query I'm looking for will return "2, 5, 0, 1".</p>