如何用条件api
编写这个sql查询 SELECT matricule
,sum(presence_badge_minutes
),SUM(presence_theorique_minutes
),(SELECT SUM(presence_badge_minutes
)来自于t2
其中({{ {1}} BETWEEN' 2016-5-20' 2016-6-2')和(date_effet
。t2
= matricule
。t1
)))作为pb1,(SELECT SUM(matricule
)来自presence_theorique_minutes
,其中({t2
BETWEEN' 2016-5-20&#39 ;和' 2016-6-2')和(date_effet
。t2
= matricule
。t1
)))作为pt1,(SELECT SUM( matricule
){} {} {} { (presence_badge_minutes
。t2
= date_effet
。t2
)))作为pb2,(SELECT SUM(matricule
)来自t1
的存在(其中) (matricule
BETWEEN' 2016-6-15'和' 2016-6-20')和(presence_theorique_minutes
。t2
= {{1 } {。{1}})))作为date_effet
的pt2作为t2
组matricule