select count(*), queryno from cmnbatch.DSN_QUERY_TABLE group by queryno order by 1 desc fetch first 100 rows only with ur