merhaba,şu sorgu belki işinize yarar
SELECT C.CODE,C.DEFINITION_,F.FICHENO,F.DATE_ FROM
LG_041_CLCARD C
INNER JOIN LG_041_01_INVOICE F
ON C.LOGICALREF=F.CLIENTREF
WHERE F.TOTALVAT NOT BETWEEN F.TOTALDISCOUNTED*0.18-1 AND F.TOTALDISCOUNTED*0.18+1 AND F.TRCODE IN(3,6,1,8)
ORDER BY F.DATE_ DESC