Re: problem with excluded days in date range query.

2006-02-03 Thread Peter Brawley
Paul, If there are no data for a particular day, it is not included. Is there a way to include all days even if the result is 0? I saw an example that included another table with all dates and an inner join but that seems a little clunky. In SQL, enumerating data you don't have requires some

Re: problem with excluded days in date range query.

2006-02-03 Thread sheeri kritzer
Database software is not a calendar. The data you put in is the data you get out. If the day is never put in, you'll never get it out. You need to have some data source that has all the days in it, like an external table, if you want to be able to retrieve that data. Otherwise, you could do it

problem with excluded days in date range query.

2006-02-03 Thread Paul Halliday
I have the following query: select count(*) as cnt, date(timestamp) as day from table where date_sub(curdate(),interval 14 day) <= timestamp group by day; If there are no data for a particular day, it is not included. Is there a way to include all days even if the result is 0? I saw an example th