如何将这个sql语句转化为hql语句 10
SELECTDEVICE_TYPE_NAMEFROMdw_cm_device_type,dw_cm_deviceWHEREdw_cm_device_type.DEVICE...
SELECT DEVICE_TYPE_NAME FROM dw_cm_device_type, dw_cm_device WHERE
dw_cm_device_type.DEVICE_TYPE_ID=dw_cm_device.DEVICE_TYPE_ID 展开
dw_cm_device_type.DEVICE_TYPE_ID=dw_cm_device.DEVICE_TYPE_ID 展开
展开全部
用返回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
大概这样,暂时没环境测试。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询