[英]Questions regarding Pentaho Report designer
I have a datetime
-type column in MySQL. 我在MySQL中有一个datetime
-type列。 Now, in my report I want to use only the date part for 现在,在我的报告中,我只想将日期部分用于
a. 一种。 grouping 分组
b. b。 comparison 比较
I tried looking for a solution on the net, however I couldn't find it. 我尝试在网上寻找解决方案,但是找不到。
How to use distinct
in the SQL query in report designer. 如何使用distinct
在报表设计器的SQL查询。 If I design the following query 如果我设计以下查询
SELECT COUNT (DISTINCT user_id) FROM mytable
it converts the same to 它将相同的转换为
SELECT DISTINCT COUNT (user_id) FROM mytable
Please help. 请帮忙。
I never ran into such behavior, but, anyway, I think a quick (but not the best) workaround would be to use the following query: 我从未遇到过这种行为,但是无论如何,我认为一种快速(但不是最佳选择)的解决方法是使用以下查询:
select
count(0)
from
(select distinct user_id from mytable) t
Doesn't work in version 3.9.1 It keeps changing it to give priority to DISTINCT I will give it a go to use the summarisation functions of Report Designer itself. 在3.9.1版中不起作用。它会不断对其进行更改,以优先使用DISTINCT。我将尝试使用Report Designer本身的汇总功能。
Cheers 干杯
AC 交流电
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.