aşağıdaki sorgu işinizi görür.
SELECT
INV.FICHENO AS "FAT. NO"
,INV.DATE_ AS "FAT. TARİH"
,CL.DEFINITION_ AS "CARİ"
,STL.AMOUNT AS "MİKTAR"
,STL.PRICE AS "FİYAT"
FROM LG_001_01_STLINE STL
LEFT OUTER JOIN LG_001_01_INVOICE INV ON INV.LOGICALREF=STL.INVOICEREF
LEFT OUTER JOIN LG_001_01_STFICHE STF ON STF.LOGICALREF=STL.STFICHEREF
INNER JOIN LG_001_CLCARD CL ON CL.LOGICALREF=STL.CLIENTREF
WHERE STF.BILLED=1 AND STL.PRICE=0 AND INV.TRCODE=8 OR INV.TRCODE=7