您的位置:首页 > 其它

Hibernate-分组统计数据

2016-06-04 13:09 239 查看
/*
* 分组聚合 select avg(h.price),max(h.price),min(h.price) from House h
*/
/*
* 各个街道房屋 select avg(h.price),max(h.price),min(h.price) from Street
* s left join s.house h group by s
*/

/*
* 隐式内连接 select avg(h.price),max(h.price),min(h.price) from House h
* group by h.street.
*/

/*
* 街区 房屋 各个县区 h_ s_q三表 select avg(h.price),max(h.price),min(h.price)
* from District d left join d.streets s left join s.house group by
* d.name
*/

/*
* select avg(h.price),max(h.price),min(h.price) from House h group
* by h.streets.district.name
*/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: