Select to view content in your preferred language

How to group a field in *.geodatabase using `AGSQuery`?

361
1
03-06-2019 05:36 AM
MuruganandhamKuppan1
New Contributor III

I would to like to group a field from `geodatabase`. The desired query is,

SELECT PINCODE

FROM <table-name>

GROUP BY PINCODE;

 

How to create a `AGSQuery` object focusing above SQL Query?

I'm using ArcGIS runtime SDK 10.2.5. 

This guide helped me explore more. The expected result should be like,

PINCODE: [

10002,

10004,

10007,

...

10022

]

But, I got as follows,

{

        PINCODE = 10002;

        "PINCODE_COUNT" = 147;

    },

        {

        PINCODE = 10004;

        "PINCODE_COUNT" = 198;

    },

        {

        PINCODE =10007;

        "PINCODE_COUNT" = 71;

    },

...

}

The PINCODE 10002 has been holding by 147 records in the database.

0 Kudos
1 Reply
NimeshJarecha
Esri Regular Contributor

Can you please post your code here?

Regards,

Nimesh

0 Kudos