<?xml version="1.0" encoding="windows-1252"?>
<node id="994985" title="Re^2: compare values while value on other column remains the same" created="2012-09-21 15:47:35" updated="2012-09-21 15:47:35">
<type id="11">
note</type>
<author id="993098">
linseyr</author>
<data>
<field name="doctext">
Actually, my output would be:
&lt;code&gt;
$chr $begin $end $id $average
&lt;/code&gt;
But I just wanted to start with calculating.

I would like to calculate the average difference between the 2 columns (5 and 6) for the same id.

So for line 3,4,5 I would like to calculate the average difference between column 5 and 6.
And for the lines for which only one line has that id, like line 1 I just want to calculate the difference between column 5 and 6, since there is no average to calculate.

I only want to output the lines that have a average difference &gt; 0.2
</field>
<field name="root_node">
994977</field>
<field name="parent_node">
994984</field>
</data>
</node>
