Jay Jetley
11/09/2023, 10:28 AMselect count(*) as value
from transaction T
where type='SalesOrd'
and trandate >= '01/04/2023'
and status = 'B'
and TO_CHAR(T.createddate, 'YYYY-MM-DD HH:MI:SS') <
TO_CHAR ( SYSDATE - ( 20 / 1440 ), 'YYYY-MM-DD HH:MI:SS' )
Shai Coleman
11/09/2023, 11:38 AMWHERE createddate <= TIMESTAMP '2023-12-31 12:00:00 UTC'
and also you can try reversing the condition using AND NOT
Jay Jetley
11/09/2023, 12:39 PM