我们在pentaho CDE上设置了一个嵌套的SQL查询。 查询:
select dataissue.value,count(value) as nbreticket,substring(issue.entry,1,3)
from DataIssue,issue where field = 'version(s)_corrigée(s)'
and dataissue.issue = issue.id and issue in ( select issue
from dataissue,issue where dataissue.issue = issue.id and value = 'récit'
and substring(issue.entry,1,3) = 'ema' ) and issue in ( select issue
from dataissue,issue where dataissue.issue = issue.id and value = 'Fermée'
and substring(issue.entry,1,3) = 'ema' ) and issue in ( select issue
from dataissue,issue where dataissue.issue = issue.id
and field = 'point_d_effort' and substring(issue.entry,1,3) = 'ema' )
group by dataissue.value
我们已经使用该查询设置了条形图组件。
但条形图没有结果。
Pentaho cde是否支持嵌套的sql Query
答案 0 :(得分:0)
Pentaho cde支持嵌套的sql Query。
SELECT SUBSTRING(issue.entry,1,3),dataissue.value,COUNT(VALUE) AS nbreticket
FROM DataIssue,issue WHERE FIELD = 'version(s)_corrigée(s)'
AND dataissue.issue = issue.id AND issue IN ( SELECT issue
FROM dataissue,issue WHERE dataissue.issue = issue.id AND VALUE = 'récit'
AND SUBSTRING(issue.entry,1,3) = 'ema' ) AND issue IN ( SELECT issue
FROM dataissue,issue WHERE dataissue.issue = issue.id AND VALUE = 'Fermée'
AND SUBSTRING(issue.entry,1,3) = 'ema' ) AND issue IN ( SELECT issue
FROM dataissue,issue WHERE dataissue.issue = issue.id
AND FIELD = 'point_d_effort' AND SUBSTRING(issue.entry,1,3) = 'ema' )
GROUP BY dataissue.value
你可以把这些sql运行并查看。
如果条形图中没有结果。
=>您可以做一件事,转到仪表板位置,这意味着您将仪表板保存在该位置的哪个位置。
=>在这些位置CDA文件就在那里。选择该CDA文件,然后单击" 在新窗口中打开"。在出现一个新窗口并选择该查询并查看结果是否显示之后。
=>如果显示结果,则sql中没有问题。
谢谢..