REPORTFORM;LEO_SA02.frf
TITLE;รายงานวิเคราะห์การขาย เรียงตามรหัสสินค้า
SQL;select invcard.ID, invmst.XDESC, sum(invcard.MQUAN) as QTY, sum(arcard.amount_d - arcard.VATAMT) as nBAL
SQL;from invcard inner join arcard on invcard.DOCNO = arcard.DOCNO
SQL;inner join invmst on invcard.ID = invmst.ID
SQL;left join salemst on arcard.SALEID = salemst.SID
SQL;group by invcard.ID
SQL;order by invcard.ID
CONDITION;ตั้งแต่วันที่~ARCARD.DATEDOC~Date~2~~
CONDITION;ตั้งแต่รหัสสินค้า~INVCARD.ID~Chr~2~SELECT ID FROM INVCARD~INV
EXCELSQL;select invcard.ID, invmst.XDESC, sum(invcard.MQUAN) as QTY, sum(arcard.amount_d - arcard.VATAMT) as nBAL
EXCELSQL;from invcard inner join arcard on invcard.DOCNO = arcard.DOCNO
EXCELSQL;inner join invmst on invcard.ID = invmst.ID
EXCELSQL;left join salemst on arcard.SALEID = salemst.SID
EXCELSQL;group by invcard.ID
EXCELSQL;order by invcard.ID
USECROSSTAB;N
CROSSTABFRF;N
CROSSTABHEAD;
CROSSTABFIELD;
