SQL="SELECT ip, MAX(progressivo) From MyTable GROUP BY IP ORDER BY 2"