update getLastOperations: order by type