我在下面的普通 SQL 中有一个查询,我想将其更改为工匠修补程序查询,
select count(P.id), DATEDIFF(P.tarehe_ya_kujifungua,P.tarehe_ya_kuzaliwa) as
umri from postnatals P INNER JOIN register13s R ON P.namba_ya_kadi_RCH4 =
R.Namba_ya_kadi WHERE EXTRACT(MONTH FROM tarehe_ya_hudhurio) = EXTRACT(MONTH
FROM '2018-06-12') group by P.id HAVING count(DISTINCT R.hudhurio) > 1 AND
umri >= 7305;
我有一个桌子模型Postnatal.php
,我也有桌子模型。postnatals
Register13.php
register13s