sql statement problem

  • Without having your actual table structure this pseudocode

    select virusname, count(*) as no_of_recordings from yourtable group by virusname order by no_of_recordings desc

    should work

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • In Frank's solution, add TOP 10 after the SELECT.

    SELECT TOP 10 virusname..........

    -SQLBill

Viewing 2 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply