I
inarobis
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
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