cleanPositions query update

We now use an unique query, with no need to use temporary table.

Thanks to @sylwit for the tip !