我可以帮助您翻译以下内容:
我能否将以下三个语句合并以在一行中显示sick_total_day
,other_total_day
和other_total_day
(相同的where子句)?
SELECT staff_key,
sum(days_applied) as sick_total_day
from Tleave_sick_leave
where staff_key = 131
and from_date>='2011/4/1 00:00:00'
and to_date<='2011/4/30 00:00:00';
SELECT staff_key,
sum(days_applied) as other_total_day
from Tleave_other_leave
where staff_key = 131
and from_date>='2011/4/1 00:00:00'
and to_date<='2011/4/30 00:00:00';
SELECT staff_key,
sum(days_applied) as other_total_day
from Tleave_vleave
where staff_key = 131
and from_date>='2011/4/1 00:00:00'
and to_date<='2011/4/30 00:00:00';