<groupby> in a SPQuery lookup



Hi,

I built a webpart to retrieve specific info from a list using the
SPQuery object.

So far I was able to build a CAML query to filter and sort elements.

I've seen that the CALM schema provdes a <groupby> aggregation
function. I've been trying to build a CAML query to get items from a
list using the groupby. The final intention is to agregate by a
categroy field and then show a SUM of another field, like in SQL:

SELECT category, SUM(column1)
FROM listname
GROUP BY category

Has anyone used the <groupby> element in CAML?

Many thanks.

.



Relevant Pages

  • Re: in a SPQuery lookup
    ... So far I was able to build a CAML query to filter and sort elements. ... I've seen that the CALM schema provdes a <groupby> aggregation ... categroy field and then show a SUM of another field, ...
    (microsoft.public.sharepoint.portalserver.development)
  • Groupby - how does this works?
    ... I've seen that the CALM schema provdes a <groupby> aggregation ... I've been trying to build a CAML query to ger items from a ... categroy field and then show a SUM of another field, ...
    (microsoft.public.sharepoint.teamservices.caml)