Changed top10 sql query