0

how can I select a list of dates in MySQL so even if there are no results for a specific date the date itself will appear?

I want something like:

select every_date,count(*) from my_table group by date,order by date;

that will generate:

20160110 5
20160109 0
20160108 7
20160107 1
O. Jones
  • 103,626
  • 17
  • 118
  • 172
  • 4
    see **[mysql-fill-in-missing-dates-between-two-dates](http://stackoverflow.com/questions/34545056/mysql-fill-in-missing-dates-between-two-dates-for-a-given-status/34545534)** – amdixon Jan 10 '16 at 10:42
  • your question not clear – Gouda Elalfy Jan 10 '16 at 10:47
  • Welcome to StackOverflow. Please provide as much details as you can. It makes finding answer easier, for example could you please describe table "my_table" (what columns are there)? http://www.stackoverflow.com/help/how-to-ask – greenmarker Jan 10 '16 at 11:56

0 Answers0