Counts and Top 10

Results 1 to 2 of 2

Thread: Counts and Top 10

  1. #1
    Join Date
    Dec 1969

    Default Counts and Top 10

    I have am connecting to a text file like a DB using a recordset and SQL to query the text file.<BR><BR>What I want to do is query and get a count of how many times a certain event id appears and then order the recordset by highest first and only get the top 10.<BR><BR>I have no idea where to start can someone point me in the right direction on counting...<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Counts and Top 10

    it would involve something like this:<BR><BR>select TOP 10 count(id) [IDCount] <BR>FROM whatever<BR>Group by [ID]<BR>ORder by [IDCount]<BR><BR>This isn&#039;t exact because my brain is shutting down for the afternoon...but this should give you something to go on

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts