Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Nested Fetch Xml aggregates

$
0
0

So I want to get the top 3 of the sum of values grouped by personid. So how do I set up the xml to support the nested aggregate?

<fetch top="50" aggregate="true" >
   <entity name="elcn_contributiondonor" >
        <attribute name="amount" alias="amount" aggregate="sum" />

        <attribute name='personid' alias='personid' groupby='true' />

   </entity>
</fetch>

Does the sum of every grouped by personId I believe but where do I put a second statement to get the top 3 of these sums?


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>