我有二十行,我正在使用sum()
:
SELECT Sum(totalcon) AS totalcon_sum,
Sum(vat3) AS vat3_sum,
Sum(rupes) AS rupes_sum,
pordernon,
po_date,
b_no,
vendortext
FROM po,
potable,
branch_master,
delivery_master
WHERE mr_assetpo = 'NCE'
AND Substr(po.pordernon, 6, 2) = branch_master.b_no
AND po.pordernon = delivery_master.deliverypo_no
AND po.transid = potable.transid
AND Year(po_date) = '"+req2+"'
AND status = 'normal'
GROUP BY Year(po_date)
我的问题是:
每当我在总和之间有空白行时,也会计算该行。我不想计算空行。