select tafsil, SH_projeh, sum(bes) assumbes, sum(bes) - sum(bed) as sumbesbed
from SANADwhere tafsil > 0 group by tafsil, SHtafsili,SH_projeh HAVING sum(bed
如何在查询中检查此字段:然后bes=amount,bed = '-‘bes和bed并不真正存在于我的表中,但数量是(int)SELECT billing.*,
CASE billing.type WHEN 'A' THEN billing.amount AS bes, '-' AS bedELSE billing.amount AS be