我的第一个查询,从给定的给定中检索date
和hours
工作。work_details
employee number
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
以及从表中检索的第二个查询:date
holy_date
SELECT holy_date
from holiday
where holy_date between '2012-02-01' and '2012-02-29'
我需要以正确的日期顺序组合两个查询的结果。我尝试了联合操作,但没有得到结果。
我该怎么做?