1

I am trying to convert following query to HQL:

select x / total*100 from
(select count( * ) as x from events e, publish_events p where e.event_id = p.event_id and e.amount <> 0 and e.creation_date > sysdate-2 and p.publish_status = 'xxxxxx' and p.publish_requester = 'xxxxx'),
(select count(*) total from events e1 where e1.creation_date > sysdate-2 and e1.event_code in (11,111,1111));

How could I solve this?

Ugnius Malūkas
  • 2,151
  • 6
  • 26
  • 37
  • Hi! You need to rethink this query to convert it to HQL/JPQL. HQL not support a `select` after a `from` clause: `from (select count( * )...`. – Dherik May 20 '18 at 11:22

0 Answers0