Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 730857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:57:35+00:00 2026-05-14T06:57:35+00:00

I have a table full of bugs. The BugTitle is the page erroring and

  • 0

I have a table full of bugs. The BugTitle is the page erroring and I also capture the error line.
I would like to build an SQL Query that selects the top 10 bugs based on bugtitle and error line.
I have this query:

SELECT COUNT(BugTitle) AS BugCount, BugTitle, ErrLine 
FROM Bugs 
WHERE BugDate >= DateAdd(Day, -30, DateDiff(Day, 0, GetDate())) 
GROUP BY BugTitle, ErrLine 
ORDER BY BugCount, ErrLine DESC

But I’m not sure if it’s correct. I’m pretty sure that my test data only has 1 bug that happens on the same line but that’s not showing up with this query.
Can anyone help?

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:57:35+00:00Added an answer on May 14, 2026 at 6:57 am

    To get the top 10 most frequent you probably want to order by the count:

    SELECT TOP(10) COUNT(BugTitle) AS BugCount, BugTitle, ErrLine
    FROM Bugs
    WHERE BugDate >= DateAdd(Day, -30, DateDiff(Day, 0, GetDate()))
    GROUP BY BugTitle, ErrLine
    ORDER BY COUNT(BugTitle) DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table full of cells and i would like to get on
I have a database table full of words. What I would like to do
i have a sql table full of address' like this Hattie:07903 000066::Dad:07854 000095::Tom:07903 000044::Allistair:07765
I have a table full of items and prices for said items. I would
[using SQL Server 2005] I have a table full of users, I want to
So I have a table full of tag keywords. Tags ------------------ asp sql html
I have a SQL Server table full of orders that my program needs to
I have a table full of domain names. I'd like to do a search
I have a SQL table full of logs that shows response time from my
I have table that has a column of type DateTime, I would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.