Skip to main content
Question

I want to know how many activities occurred for each group

  • May 16, 2023
  • 2 replies
  • 16 views

I have a category table, table2 and Activity table

relation is category(N) - table2(1) - Activity(N)

in a bar chart, I want to show group from category table and count of activities for each group. I’m getting no common table error while configuring a component.

how to fix this for a relationship N:1:N

 

2 replies

andré.tafur
Level 8
Forum|alt.badge.img+15

Hello Preethi,

 

Try to use a PQL combining the PU and BIND functions, I am not clear which is the query you are using but I leave you an example of how you could solve your problem.

 

PU_SUM("category_table", BIND("table2", "activity_table"."activities")) )

 

I hope it helps you


  • Author
  • Level 7
  • May 16, 2023

Hello Preethi,

 

Try to use a PQL combining the PU and BIND functions, I am not clear which is the query you are using but I leave you an example of how you could solve your problem.

 

PU_SUM("category_table", BIND("table2", "activity_table"."activities")) )

 

I hope it helps you

Hi @andré.tafur , thank you

but this way also I’m getting error that there is no relation between table2 and activity table

but there is 1:N relation between them