Let's say that I have the following list
data = {{-41.10000000000002`, 2.873303230466569`,
6.310063685614807`}, {-41.10000000000002`, 2.873303230466569`,
5.839065774185954`}, {-41.10000000000002`, 19.236823144577595`,
11.735697959768771`}, {-41.10000000000002`, 19.236823144577595`,
12.10072134112616`}, {-31.340000000000032`, 11.842619292783251`,
20.776241204139154`}, {-31.340000000000032`, 11.842619292783251`,
20.78670782439312`}, {-21.590000000000032`, 4.449371441148591`,
19.155223392304862`}, {-21.590000000000032`, 4.449371441148591`,
19.363247469852638`}, {-41.10000000000002`, 35.60127021988911`,
3.921057612645157`}, {-41.10000000000002`, 35.60127021988911`,
9.843856348862907`}};
I would like to select the sublists with the same first and second element. For all sublist that meet this first criteria, select the maximum third element. For example for the given list, the solution will be:
{{-41.10000000000002`, 2.873303230466569`,
6.310063685614807`}, {-41.10000000000002`, 19.236823144577595`,
12.10072134112616`}, {-31.340000000000032`, 11.842619292783251`,
20.78670782439312`}, {-21.590000000000032`, 4.449371441148591`,
19.363247469852638`}, {-41.10000000000002`, 35.60127021988911`,
9.843856348862907`}}