Comparing values in a list to create a matching list
<p>I have list in this style:</p>

<pre><code>[ [x,y,z] , [x1,y1,z1] , [...]].
</code></pre>

<p>My problem is that I want to make a new list with somehow sorted values. In a first step I want to make a list where for all the same x and y I have the corresponding z values. Here is a example:</p>

<p>raw data:</p>

<pre><code>[[1,2,5],[1,2,6],[1,2,7],[2,2,10],[2,2,11]] 
</code></pre>

<p>processed data:</p>

<pre><code>[[1,2 [5,6,7]],[2,2[10,11]]
</code></pre>

<p>In the final step I would like to have  list like that:</p>

<pre><code>[[x values], [y values], [z minimum values], [z length]]
[[1,2],[2,2],[5,10],[3,2]]
</code></pre>

<p>First I tried to make a list with all possible combinations of x and y (its not infinite in my data) but then I thought that just comparing the consecutive values would be easier, but I didnt figure it out.</p>