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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:33:33+00:00 2026-05-25T02:33:33+00:00

I need your help in following case. i have table ChartData in that table

  • 0

I need your help in following case.

i have table ChartData

in that table i have large number of records as per below

PK,ProjectID,MAchineId,Powervalue,PowerData
1     1         1         20.5     2011-07-05 12:00:00    
2     1         1         21.5     2011-07-05 12:01:00
3     1         1         22.5     2011-07-05 12:02:00
4     1         1         23.5     2011-07-05 12:03:00
5     1         1         24.5     2011-07-05 12:04:00

6     1         1         25.5     2011-07-05 12:05:00    
7     1         1         26.5     2011-07-05 12:06:00
8     1         1         27.5     2011-07-05 12:07:00
9     1         1         26.5     2011-07-05 12:08:00
10     1        1         28.5     2011-07-05 12:09:00

Output

PK,ProjectID,MAchineId,Powervalue(Avg value of power),PowerData

1     1         1           20.5            2011-07-05 12:00:00    
6     1         1           25.5            2011-07-05 12:05:00    

any help would be appreciated. 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-25T02:33:34+00:00Added an answer on May 25, 2026 at 2:33 am

    I guess you want to aggregate every five tuples? If so, maybe something like this will help:

    SELECT PK, ProjectID, MachineID, AVG(Powervalue), PowerData FROM table GROUP BY (PK-1)/5

    although I don’t really know if you can do that with GROUP BY

    @gbn: I would like to answer to your comment directly, but I think I lack the privilege. Can you explain why this will fail on all but MySql?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need your help to optimize the query below. Let us assume we have
I need your help in solving the following 2 functions/problems: 1) I have to
I am just starting to learn js and need your help. I have following
I need your help, For example I have a decimal type variable and I
I need your help to define a special case in XML schema: A sequence
I've some questions .. and I really need your help. I have an application.
I need your expertise once again. I have a java class that searches a
today i need your help to get an specific sql select query. i have
I've reached the end of my Linq rope. Need your help! Heres my table
I really need your help since I have a frustrating problem. I'm downloading data

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.