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 8224735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:10:23+00:00 2026-06-07T15:10:23+00:00

Below it the table which contains Actual Count and Error Count for each ID.

  • 0

Below it the table which contains Actual Count and Error Count for each ID.

USER_ID    |    Actual_Count    |   Error_Count
-----------+--------------------+---------------------
1345653         5                     4
534140349       5                     0
682527813       4                     0
687612723       3                     0
704318001       5                     4

So if you look at the above scenario, For this 1345653 ID Out of 5, it has 4 errors, same with 704318001 ID, out of 5 it has 4 errors. And all other ID’s they didn’t have any errors as Error_Count is Zero for them. How can I calculate the total error percentage in SQL? Is it possible to calculate the total error percentage?

  • 1 1 Answer
  • 0 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-06-07T15:10:25+00:00Added an answer on June 7, 2026 at 3:10 pm

    You can simply sum and divide the individual counts:

    SELECT 100 * sum(Error_Count) / sum(Actual_Count) FROM MyTable;
    

    This will not work in all databases, because some (such as SQL Server) do integer division. The following does work:

    SELECT 100 * sum(Error_Count*1.0) / sum(Actual_Count) FROM MyTable;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As shown below the Table Recording contains three foreign keys, only one of which
I have a table which contains asp radiobuttonlists (see below) for a survey. Once
I have a table of Checklists , each of which contains a bunch of
I have a table below which contains a textbox and next to the textbox
I have a query as below to find duplicates in my table which contains
I have a table which has the below columns. Ticket_id (Primary key, Int) Attachment1
I have a Generic List object which hold below table as its own value.
I m new with jquery.Below is my html table which is in content page.In
I have two table masterTbl and detailTbl which structure is given below... --PRIMARY TABLE
I have the following listbox below which binds to a database table of image

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.