• select top 100 ID,

    count (ID) myCount

    from [database].

    .

    group by id

    order by myCount;

    You cant use a * in an aggregate query unless you group by every column in the table

    select top 100 ID,

    count (*) myCount

    from [database].

    .

    group by id, col2, col3, col4, col5......................................

    order by myCount;