Hi,
I have the following query
var clickQuery = xtk.queryDef.create(
<queryDef schema={vars.targetSchema} operation="select" >
<select >
<node expr="distinct(@journalDistributionID)" alias="@clicksJD_id"/>
<node expr="date(@created)" alias="@clicksDate"/>
<node expr="count(@type)" alias="@clicksCount" />
<node expr="count([@broadLog-id])" alias="@ID" />
</select>
<where>
<condition bool-operator="AND">
<condition expr="@type='1'" />
<condition expr="@type!='3'" />
</condition>
</where>
<orderBy/>
<groupBy>
<node expr="@journalDistributionID" />
<node expr="date(@created)" />
<node expr="@type" />
</groupBy>
</queryDef> );
Unfortunately Countdistinct is not working for me. Can you pls help?
Regards,
Priyanka
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Priyanka,
CountDistinct as a function should work , probably the syntax for picking up broadLog-id is wrong.
If the target schema is linked to the broadLogRcp schema the syntax would be [targer/@broadlog-id] .
regards,
adhiyan
Views
Replies
Total Likes
Sorry I'm reposting my query
var clickQuery = xtk.queryDef.create(
<queryDef schema={vars.targetSchema} operation="select" >
<select >
<node expr="distinct(@journalDistributionID)" alias="@clicksJD_id"/>
<node expr="date(@created)" alias="@clicksDate"/>
<node expr="count(@type)" alias="@clicksCount" />
<node expr="Countdistinct([@broadLog-id])" alias="@ID" />
</select>
<where>
<condition bool-operator="AND">
<condition expr="@type='1'" />
<condition expr="@type!='3'" />
</condition>
</where>
<orderBy/>
<groupBy>
<node expr="@journalDistributionID" />
<node expr="date(@created)" />
<node expr="@type" />
</groupBy>
</queryDef> );
Views
Replies
Total Likes
Hi,
I don't know what can cause this. Were you able to resolve the issue since?
Florent
Views
Replies
Total Likes
Hi Priyanka,
CountDistinct as a function should work , probably the syntax for picking up broadLog-id is wrong.
If the target schema is linked to the broadLogRcp schema the syntax would be [targer/@broadlog-id] .
regards,
adhiyan
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies