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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:44:11+00:00 2026-05-27T07:44:11+00:00

I need to do a graphic of the arithmetic mean (I don’t know if

  • 0

I need to do a graphic of the arithmetic mean (I don’t know if this is the correct word, sorry) between to dates and get the mean of hours for monday, tuesday… sunday. The hours per day of the week.

The table has the column log_date and I have an start day and end day and actually I do:

SELECT id, log_hours FROM log WHERE log_date >= DATE('2011-01-01') AND log_date <= DATE('2011-10-31')

This will give me the id’s between this two dates. But I don’t need this. What I need is a medium for monday, tuesday, etc. each day of the week to know what’s the normal hours done everyday of it.

How I can do it? I’m also coding in PHP

UPDATE:

What I finally need:

MONDAY: 3, 4, 10, 12, 5, final result => 6,8
TUESDAY: 2, 8, 8, 2, 1, final result => 4,2
WENDSDAY: 1, 1, 10, 5, 2, final result => 3,8
THURDAY 8, 10, 12, 5, 6, final result => 6,2
FRIDAY: 1, 1, 1, 1, 1, final result => 1
SATURDAY: 0, 8, 2, 0, 1, final result => 2,2
SUNDAY: 0, 0, 0, 0, 0, final result => 0

Thanks in advance!

  • 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-05-27T07:44:12+00:00Added an answer on May 27, 2026 at 7:44 am

    You can use the DAYOFWEEK function to select values from a certain day. This query will give you the average of log_hours from each day in a single query:

    SELECT DAYOFWEEK(log_date), AVG(log_hours) FROM log 
    WHERE log_date >= DATE('2011-01-01') AND log_date <= DATE('2011-10-31')
    GROUP BY DAYOFWEEK(log_date)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a similar post on Graphic Design. I need to know how to
I'm using Highcharts to make this graphic: But I need to make the border
I need a way of changing the mouse-cursor on a html-page. I know this
This is an odd one ... I need to display a graphic always that's
i am new to this core graphics or cv . I need a little
Need to apply a filter to a file like this: TUPAC_0006:1:1:2554:2356#0/1 0 * 0
Need a map reduce function by mongo in php This my mongo structure [_id]
I need to create an audio graphic equalizer with the commonly used presets ,
I'm trying to write simple graphic editor using PyGObject and python 3. I need
I need to know if any kind of file can be signed digitally, using

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.