I create a report in TIBCO, insert the SQL expression there:
SELECT date_trunc('hour', header.input_time), count(header.id) AS total, count(CASE WHEN (header.decision = 'REFUSED') THEN 1 ELSE NULL END) AS refused from test_bank_schema."TRANSACTION_HEADER" AS header where header.history IS TRUE group by date_trunc('hour', header.input_time) order by date_trunc('hour', header.input_time) asc; Which without errors is executed from IDEA.
And in TIBCO he emphasizes a bunch of errors:
And accordingly does not want to be executed.
