I made a small model with Processing in QGIS 2.6.
The final layer should be the result of a SQL query. Now, in the
Execute SQL dialog window I can add the query:
select name, max(ele) as ele, geom from layer_id group by id
but I haven't understood which name have I to specify in the query (
layer_id in the example).