使用纯SQL实现禅道报表设计

发表于:2016-7-12 11:27

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:ktide    来源:51Testing软件测试网采编

  · 禅道中按产品计划统计需求阶段分布表
  · 使用纯sql替代报表设计
  sql 语句
  select t2.title, sum(t1.stage='wait') as PRD中, sum(t1.stage='planned') as PRD评审, sum(t1.stage='projected') as PRD完成, sum(t1.stage='developing') as 研发中, sum(t1.stage='developed') as 研发完毕,sum(t1.stage='testing') as 测试中, sum(t1.stage='tested') as 测试完毕, sum(t1.stage='verified') as 已验收, sum(t1.stage='released') as 已发布, count(t2.title) as 总计 from zt_story as t1, zt_productplan as t2 where t1.plan=t2.id and t1.product='43' and t2.product='43' group by t2.title
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号