怎么将这个oracle的sql语句转换成hibernate的hql语句?
答案:2 悬赏:0 手机版
解决时间 2021-02-01 15:17
- 提问者网友:你挡着我发光了
- 2021-02-01 07:14
select c.id,c.name,nvl(sum(h.count*w.price),0) as money from t_client c left join t_history h on c.id = h.clientid left join t_wares w on w.id = h.waresidgroup by c.id,c.name
最佳答案
- 五星知识达人网友:走死在岁月里
- 2021-02-01 08:51
用返回map的方式吧。
select c.id,c.name,nvl(sum(h.count*w.price),0) as money
from t_client c left join t_history h on c.id = h.clientid left join t_wares w on w.id = h.waresid
group by c.id,c.name
select new map(c.id,c.name,nvl(sum(h.count*w.price),0) as money)
from Client c left join c.History h left join Wares w
group by c.id, c.name
大概这样,暂时没环境测试。
select c.id,c.name,nvl(sum(h.count*w.price),0) as money
from t_client c left join t_history h on c.id = h.clientid left join t_wares w on w.id = h.waresid
group by c.id,c.name
select new map(c.id,c.name,nvl(sum(h.count*w.price),0) as money)
from Client c left join c.History h left join Wares w
group by c.id, c.name
大概这样,暂时没环境测试。
全部回答
- 1楼网友:等灯
- 2021-02-01 10:20
public list
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯