Mybatis 聚合函数
来源:互联网 发布:江南七怪 知乎 编辑:程序博客网 时间:2024/06/15 05:41
</select>
<!-- 折线图 -->
<select id="selectBroken" resultType="map">
select sum(t.score_num) score_num,trunc(t.tim/10000) tim(聚合函数必须区别名!!)
from tbl_score_log t where 1= 1
<if test="beginDate != null and beginDate!= '' ">
tim >= #{beginDate}
</if>
<if test="endDate != null and endDate != '' ">
and tim <= #{endDate}
</if>
<if test="uid!=null and uid!='' ">
and t.user_id =#{uid}
</if>
<if test="type !=null and type!= '' ">
and t.score_type = #{type}
</if>
group by trunc(t.tim/10000)
</select>
<!-- 折线图 -->
<select id="selectBroken" resultType="map">
select sum(t.score_num) score_num,trunc(t.tim/10000) tim(聚合函数必须区别名!!)
from tbl_score_log t where 1= 1
<if test="beginDate != null and beginDate!= '' ">
tim >= #{beginDate}
</if>
<if test="endDate != null and endDate != '' ">
and tim <= #{endDate}
</if>
<if test="uid!=null and uid!='' ">
and t.user_id =#{uid}
</if>
<if test="type !=null and type!= '' ">
and t.score_type = #{type}
</if>
group by trunc(t.tim/10000)
</select>
0 0
- Mybatis 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- 聚合函数
- RabbitMQ学习之Flow Control
- Android Studio常见错误之:Rendering Problems/The following classes could not be instantiated
- linux网络编程(1)——linux_IP命令和内核的主要模块
- POJ 3211 Washing Clothes(???)
- ASP网页IIS发布出现HTTP 错误 404.3
- Mybatis 聚合函数
- float和double丢失精度问题,可用Long来转换
- 封装jquery插件很简单
- SuperMap iServer Java 如何配置缓存参数
- Follow me 挑战程序与设计
- ZOJ3775-?(>_o)!
- 单链表的基本操作
- ACM n-1位数
- Java 保留2位小数点(2种方式)