I\'m trying to select data between two date range. However not all data are being inserted daily. Below is sample of the table:
mysql> SELECT * FROM atten
MySQL cannot generate data that isn't there. If you want non-existent dates, you'll need to have a temporary table that contains the full date range you join against. Another alternative is to maintain a server-side variable and do some date math for each row, which is ugly
select @dateval := '2012-07-02';
SELECT @dateval := @dateval + INTERVAL 1 DAY from ...