转换SQL查询以查找比率为2的子查询到HQL

时间:2018-05-16 08:38:42

标签: sql hibernate hql

我正在尝试将以下查询转换为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));

我怎么解决这个问题?

0 个答案:

没有答案