下面是我写的Oracle SQL语句,有高手帮忙转换成HQL吗?急急急...
select repeat/sumcount from(
select count(*) repeat from(
select count(*) a from EDU_SC_CLICKIS group by cip having count(*)>1)),
(select count(distinct(cip)) sumcount from EDU_SC_CLICKIS)
select repeat/sumcount from(
select count(*) repeat from(
select count(*) a from EDU_SC_CLICKIS group by cip having count(*)>1)),
(select count(distinct(cip)) sumcount from EDU_SC_CLICKIS)
偶尔帮开发人员讨论错误,发现都差不多,可能函数上有所差异吧
select count(*) a from EDU_SC_CLICKIS group by cip having count(*)>1))红色部分可以使用一对多的映射。