Hello. There is a problem with the simplification of the sql query. Here is my request.
SELECT count(*) from ORACLE.Z_DELIVERY where batch like '%' || :pipeYear || '-' || :pipeNumber and ORG_ID = :shopID and VBTYP = 'T' and PSTNG_DATE =( select max(PSTNG_DATE) from Z_DELIVERY where batch like '%' || :pipeYear || '-' || :pipeNumber and ORG_ID = :shopID and VBTYP = 'T' ) But the problem is that like it works twice for a very long time. And since in the external query with the batch field, there is already a comparison like. After all, you can replace it in the internal one using join. If anyone can tell how to do this preferably with an example, I will be very grateful. Thanks in advance.