禅道缺陷统计

郑东成 2022.1.6

禅道缺陷统计的sql 

#禅道是mysql 数据库 ip 是网址ip  账号是root 默认密码是 空
with 
	zt_module as (SELECT id , name   module_name FROM zt_module) ,
	zt_product as (SELECT id , name   product_name from  zt_product),
	zt_project as (SELECT id , name   project_name FROM zt_project)
SELECT   product_name "产品名",project_name "项目名" ,module_name "模块名", zt_bug.id  "缺陷Id", title "缺陷标题", severity "严重程度", activatedCount "激活次数",resolvedBy "修复者",resolution "修复方式" , (CASE when confirmed = 1 THEN "确认" ELSE "未确认" end) as "确认缺陷" , openedDate , closedDate
FROM zt_bug,zt_module,zt_product,zt_project  
WHERE 1 = 1
and zt_bug.module = zt_module.id
and zt_bug.product = zt_product.id
and zt_bug.project = zt_project.id

出报表:

Python使用CSV模块,当写入多行时中间出现空行解决 - LK还有梦想 - 博客园

你可能感兴趣的:(PYTHON,python,mysql)