sql - 将SQL查询查找比两个子查询转换为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));
我怎么能解决这个问题?
解决方案
推荐阅读
- c++ - 在 Qt 中通过信号和槽系统传递变量
- mysql - 处理 searchresults.jsp 时发生异常
- html - 右面板底部有 div
- django - Django 两因素身份验证设置
- android - Android中的Xamarin Forms WebView:无法在WebView中打开HTML中的PDF链接
- python-3.x - 我无法安装底图包
- php - PHP/MYSQL 插入什么也不做
- sql - 如何将列中的 NULL 值换成最后一个非 NULL 值?
- amazon-s3 - 将本地文件夹结构同步到 s3 根结构
- css - 如何将 Angular 的模拟封装属性应用于动态添加到 Angular 组件的 HTML 元素?