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

  • SEARCH
  • Home
  • 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 7832525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:15:52+00:00 2026-06-02T12:15:52+00:00

I log errors in my websystem where people can log in from anywhere and

  • 0

I log errors in my websystem where people can log in from anywhere and for instance download things I share; family photos, dokuments ++.

It’s a overkill system, but as a developer I think it’s fun 😀

In my errortable i have the following structure:
DataTime Userid(int) IP(varchar) ErrorMessage(text)

In my persontable I have the following structure:
Id(int) Firstname(varchar) Lastname(varchar)

I want to count the number or errors, per different errors… but I think Im doing a mistake since the same user can have several IPs, and one IP can have several users. The SQL is the following:

SELECT TO_CHAR(DateTime, 'DD') DAY, 
       TO_CHAR(DateTime, 'MM') MONTH, 
       log.ErrorMessage, 
       CONCAT(CONCAT(person.lastname, ', '), person.firstname), 
       log.IP, 
       count(*) AS "COUNT"
  FROM errorlog log
  FULL JOIN person person
    ON log.Userid = person.Id
 WHERE log.DateTime BETWEEN foo 
                        AND foo2
 GROUP BY TO_CHAR(DateTime, 'MM'), 
          TO_CHAR(DateTime, 'DD'), 
          person.Lastname, 
          person.Firstname, 
          log.IP, 
          log.errormessage
ORDER BY MONTH ASC, 
         DAY ASC;

I think my sql might be grouping “away” same person on different IP.

  • 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-02T12:15:58+00:00Added an answer on June 2, 2026 at 12:15 pm

    Since you’ve included people’s names and ip address in your SELECT clause it will be returning error count per error message per person per ip address per date.

    If you just want the error count per error message per date then omit people’s names and ip addresses from your query:

    SELECT TO_CHAR(DateTime, 'DD') DAY,
           TO_CHAR(DateTime, 'MM') MONTH,
           log.ErrorMessage,
           count(*) AS "COUNT"
      FROM errorlog log
      WHERE log.DateTime BETWEEN foo
                             AND foo2
      GROUP BY TO_CHAR(DateTime, 'MM'),
               TO_CHAR(DateTime, 'DD'),
               log.IP,
               log.errormessage
    ORDER BY MONTH ASC,
             DAY ASC;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a project that can log errors in requests to Django on Google
What have people used to catch, log, and report multiple data validation errors at
I would like to log errors/informational and warning messages from within my web application
I am trying to setup PHP to log errors locally so that I can
PHP currently will not log errors produced from the command line. I have: log_errors
Following advice , I'm planning to log errors from several time critical python processes
What would be the best way to get email notifications from error_log errors? For
I want to log some seemingly random errors I'm getting in a Delphi written
I have many errors in my apache error log like this: [Mon Mar 26
I keep seeing errors in the Dev Server console log about the Datastore Admin

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.