Distinct count of COLUMN1 for each value in COLUMN2

Hi Guys,

I am trying to convert the below query to a!queryEntity()

SQL: SELECT COUNT(DISTINCT `COLUMN1`),`COLUMN2` FROM `TABEL ` WHERE ` COLUMN2` IN (id1,id2) GROUP BY ` COLUMN2 `

I want distinct count of COLUMN1 for each value in from COLUMN2

I have written the below logic in appian

     aggregation: a!queryAggregation(

        {

          a!queryAggregationColumn(

            field: " COLUMN1",

            aggregationFunction: "COUNT",

             isGrouping :true()

          ) ,

            a!queryAggregationColumn(

            field: " COLUMN2",

             isGrouping :true()

          )

        }

      )

It is working fine for one ID, But not getting desired output when i pass multiple ID 

Can someone please help, Thank You:)

Regards,

Shashank

  Discussion posts and replies are publicly visible