My first query, retrieving date
and hours
worked from work_details
of a given employee number
in a given date
.
SELECT date,
SEC_TO_TIME( SUM( TIME_TO_SEC( `total_hours` ) ) ) AS total
FROM `work_details`
WHERE employee_id='28'
and date between '2012-02-01'
and '2012-02-29'
GROUP BY DATE ORDER BY DATE
and the Second query retrieving date
from table holy_date
:
SELECT holy_date
from holiday
where holy_date between '2012-02-01' and '2012-02-29'
I need to combine results of the two queries in the correct date order. I tried union operation,but dint get result.
How can I do it?