Simple group by with Xquery



Hello,

I am newbie in Xquery and i would like to do a simple group by date and
ID.

so a piece of my xml file.
<Authors>
<Author>
<ID>1</ID>
<Date>30.07.2000</Date>
<NTS>56</NTS>
</Author>
<Author>
<ID>1</ID>
<Date>30.06.2000</Date>
<AI>0.00707</AI>
</Author>
<Author>
<ID>1</ID>
<Date>31.07.2000</Date>
<AI>0.00633</AI>
</Author>
<ID>1</ID>
<Date>31.05.2000</Date>
<TVS>2.33</TVS>
</Author>
<ID>1</ID>
<Date>30.06.2000</Date>
<TVS>2.54</TVS>
</Author>
<ID>1</ID>
<Date>31.07.2000</Date>
<TVS>2.46</TVS>
</Author>
....
</Authors>

I would like to group by date and author ID have the TVS, AI and NTS
for every date instead of having seperate records for each date

For example:

<Author>
<ID>1</ID>
<Date>30.07.2000</Date>
<NTS>56</NTS>
<AI>0.00633</AI>
<TVS>2.46</TVS></Author>

I tried to do several codes without success. Any suggestion for this
problem?

Ina

.



Relevant Pages

  • Problems with BizTalk rules
    ... I'm a bit of a newbie with BizTalk and have come across a problem that I hope ... up using the business rules composer and place the result into a XML file. ...
    (microsoft.public.biztalk.general)
  • Basic Login Page
    ... Hey I'm a bit a newbie when it comes to asp.net and every site I have ... visited has just lead me in circles. ... thing that checks your username against a XML file that stores username pass ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Newbie: XML and database
    ... I'm newbie in java and i have a problem: I have a program written in java which create a XML file. ... My task is to create program which will export from this XML file its contentthen will connect with database and puts it to it. ... As i mentioned I'm newbie so I will be appricate for any help for example sample of code or links where can i get help. ... Mostly i am interested in exporting content of XML file. ...
    (comp.lang.java.databases)
  • Re: Dynamic properties ?
    ... C# newbie wrote: ... > I've a program which runs some XPath queries to retreive information within ... > an xml file. ...
    (microsoft.public.dotnet.languages.csharp)
  • xquery
    ... I need some help to create the following xquery: ... calculate the total sales for each part number. ... Here is the xml file: ...
    (comp.text.xml)