我正在尝试进行计算并在 select 语句中填充一个字段。它看起来像这样:
CREATE VIEW SALES_REPORT AS(
SELECT
INVOICENO,
INVOICEDATE,
CLIENTID,
CONTACT,
INVOICEJOBNO,
ADDCHARGES,
CHARGESINFO,
EMPLOYEEID,
USUALPAY,
VAT,
SUBTOTAL (SELECT(USUALPAY * COUNT(*) AS SUBTOTAL FROM SALES_REPORT)),
TOTAL = (SUBTOTAL * VAT)
FROM SALES_REPORT_JOINS_CONFIG
GROUP BY INVOICENO ORDER BY INVOICEDATE DESC);
任何帮助都会很棒,谢谢!