查看完整版本: CQ的图表能不能实现过滤?

没有蛀牙 2008-7-2 10:27

CQ的图表能不能实现过滤?

各位,请教一下:
我现在有一个条形图,用来统计每个user提交了多少defect(如附件所示)
由于user越来越多,这个图被撑的太大了

所以我想[color=royalblue]把只提交过1个defect的user给过滤一下,不让它显示在图表里面[/color]

但是建立图表的过程不能选择过滤器
是不是可以通过修改SQL编辑来实现?
如果可以,请帮忙说明一下该如何实现?谢谢

scmtata 2008-7-3 10:37

回复 楼主 的帖子

图表都可以用SQL直接改的, 你在条件里加个限制 and count(..) >1应该就可以了吧。
不知道有没理解错。

没有蛀牙 2008-7-4 16:09

[color=deepskyblue]系统的SQL语句是这样的:[/color]
select distinct count(distinct T1.id),T3.login_name from csm T1,users T3,groups T25,parent_child_links T25mm where T1.submitters = T3.dbid and T3.dbid = T25mm.parent_dbid  (+)  and 16777326 = T25mm.parent_fielddef_id  (+)  and T25mm.child_dbid = T25.dbid  (+)  and (T1.dbid <> 0 and (T25.name = 'Customer'))group by T3.login_name order by T3.login_name DESC

[color=deepskyblue]我给加了一句:[/color]
select distinct count(distinct T1.id),T3.login_name from csm T1,users T3,groups T25,parent_child_links T25mm where T1.submitters = T3.dbid and [color=red](count(distinct T1.id)>1)[/color] and T3.dbid = T25mm.parent_dbid  (+)  and 16777326 = T25mm.parent_fielddef_id  (+)  and T25mm.child_dbid = T25.dbid  (+)  and (T1.dbid <> 0 and (T25.name = 'Customer'))group by T3.login_name order by T3.login_name DESC

系统报错,请帮忙看看,应该如何去写?

scmtata 2008-7-7 09:57

回复 板凳 的帖子

试试这个:
select distinct count(distinct T1.id),T3.login_name from csm T1,users T3,groups T25,parent_child_links T25mm where T1.submitters = T3.dbid and T3.dbid = T25mm.parent_dbid  (+)  and 16777326 = T25mm.parent_fielddef_id  (+)  and T25mm.child_dbid = T25.dbid  (+)  and (T1.dbid <> 0 and (T25.name = 'Customer'))group by T3.login_name  [color=Red]having  (count(distinct T1.id)>1)[/color]  order by T3.login_name DESC
页: [1]
查看完整版本: CQ的图表能不能实现过滤?