<select id="getCountByDISC" resultType="com.rm.algo.entity.AlgoResult">
SELECT
sum( case when t2.type='D' and content='0' then 1 else 0 end) as unlikeD,
sum( case when t2.type='I' and content='0' then 1 else 0 end) as unlikeI,
sum( case when t2.type='S' and content='0' then 1 else 0 end) as unlikeS,
sum( case when t2.type='C' and content='0' then 1 else 0 end) as unlikeC,
sum( case when t2.type='D' and content='1' then 1 else 0 end) as likenessD,
sum( case when t2.type='I' and content='1' then 1 else 0 end) as likenessI,
sum( case when t2.type='S' and content='1' then 1 else 0 end) as likenessS,
sum( case when t2.type='C' and content='1' then 1 else 0 end) as likenessC
FROM cust_record_data t1 left JOIN cust_qn_option t2 ON t1.option_id=t2.id WHERE
t1.validate_flag="Y" AND t2.validate_flag="Y" AND t1.qn_id=#{param1} AND t1.`status`=1
</select>

  

最新文章

  1. Android 短信监听及用途分析
  2. iis设置asp站点
  3. 【原创】关于不同分支代码的Merge有了透彻的理解
  4. Shiro-认证
  5. SVN提交碰到的问题奇怪的问题
  6. js javascript jquery区别和联系
  7. 在ASP.NET开始执行HTTP请求的处理程序之前
  8. Winform  隐藏程序窗口
  9. Linux命令: ln
  10. GDB: basics
  11. stm32通过电调带动电机(可按键调速)
  12. 一个CSS简单入门网站
  13. python入门day01
  14. python简单入门
  15. SQLServer图数据库一些优点
  16. 2019_01_16 sem_init
  17. C# 操作文件类,文件夹存在判断,创建,文件内容读写。
  18. grid - 网格项目层级
  19. hive SQL 行转列 和 列转行
  20. 小程序组件 scroll-view 滑动

热门文章

  1. 分析你的第一个Android程序
  2. 内网渗透DC-2靶场通关(CTF)
  3. Visual Studio Debug only user code with Just My Code
  4. MOSFET管驱动电路的设计
  5. GPIO原理与配置(跑马灯,蜂鸣器,按键)
  6. Des加密解密(公共方法)
  7. Linux上Qt旋转显示
  8. Delphi的手机程序隐藏顶部信号栏
  9. CANN5.0黑科技解密 | 别眨眼!缩小隧道,让你的AI模型“身轻如燕”!
  10. 非对称加密和linux上的 ssh-keygen 工具使用