Luc*_*uca 13 select hibernate hql criteria
我想知道是否可以在from子句中指定一个select子句
select count(*) as Y, this_.NAME as A, sel2.C
from TABLE1 this_,
(select count(*) as C from
(select this_.NAME, this_.SEX
from TABLE1 this_ group by this_.NAME, this_.SEX) sel1
) sel2
group by this_.NAME, sel2.C;
Run Code Online (Sandbox Code Playgroud)
我需要这样的查询,以便将计数作为外部查询中的额外列.我无法找到如何在from中指定select语句,既不使用hql也不使用条件.
谢谢.
卢卡
| 归档时间: |
|
| 查看次数: |
21900 次 |
| 最近记录: |