```SELECT * FROM ( SELECT tranid FROM Transaction...
# suiteql
g
Copy code
SELECT * FROM (
SELECT tranid
FROM
	Transaction
	INNER JOIN TransactionLine ON
		( TransactionLine.Transaction = Transaction.ID )
WHERE
         TranDate = TO_DATE( TO_CHAR ( SYSDATE - 1, 'DS' ), 'DS' )
and type = 'CustInvc'
and location = 2
and taxline = 'F'
and iscogs  = 'F'
and Transaction.entity in ('712','551','1135','553','552')
group by tranid
)
ORDER BY TRANID