473,416 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Getting Total average

Hey all,

I'm trying to get a total average of the daily average. Below is my query for getting the daily average:

SELECT DailyAverage=AVG(T.Photo_Reading)
,date=s.H_date
FROM T inner join
s on T.CID = s.EID
where T.CID like '3RBK%'

Group by sL3CoilLog.H_date
Order by sL3CoilLog.H_date desc.

Here is my output:

Daily AVG Date
76.580000 02182010
76.823076 02172010
88.040000 02162010
81.918750 02152010
82.436363 02142010
76.300000 02132010
79.622727 02122010
76.300000 02112010
78.866666 02092010
75.728000 02082010
73.320000 02072010

The number that I'm looking for is 78.7214, which is the total average of the daily average. Any idea of how to query it?
Feb 24 '10 #1
1 2022
OraMaster
135 100+
Hi
Please give a try to below SQL. It may help you.

SELECT AVG (da.daily_avg)
FROM (SELECT h_date, AVG (photo_reading) daily_avg
FROM t
GROUP BY h_date
ORDER BY h_date) da
Modify this SQL as per you need.

Regards,
Bhushan
Feb 25 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Stephen Miller | last post by:
Hi, I am trying to add a staggered running total and average to a query returning quarterly CPI data. I need to add 4 quarterly data points together to calculate a moving 12-month sum (YrCPI),...
2
by: Kai Grossjohann | last post by:
I would like to put a text input field (in the sense of <input type="text">) and an image next to each other, where I know the size in pixels of the image, and I know the total width in em. I...
6
by: Aaron | last post by:
I'm trying to get an average of a long and a std::vector::size_type, but keep getting 0 for some reason. I've tried the following: float avg = some_long / some_vec.size(); float avg =...
3
by: CSDunn | last post by:
Hello, I have 14 fields on a report that hold integer values. The field names use the following naming convention: T1Number, T2Number ....T14Number. I need to get a 'sub total' of all fields as...
3
by: John M | last post by:
I'm lost on somethingthat I feel ought to be simple - getting the contents of a field! The database relates to school students and their subjects. The current record has as its source a query...
19
by: sasan3 | last post by:
Every thread I start goes out on a tangent simply because some of you people are not reading my posts carefully: Here is the phrase I am proposing for inclusion in the FAQ: "to existing...
4
by: Gary | last post by:
Hi, I have a temperature conversion program down pat, but I was told to add an average, meaning, i need to get the average temperature for as many times as it was entered. i do not know where to...
1
by: zaiena | last post by:
hi how to calculate the total average for many text boxes values in the same form for example i have three text boxes two in the main form and the last one in the sub form so when the user define...
12
by: miguelguerin | last post by:
Im having trouble getting the input from one file to another. Main file: package assigment3; /** * * @author mguer017 */ public class Main {
185
by: jacob navia | last post by:
Hi We are rewriting the libc for the 64 bit version of lcc-win and we have added a new field in the FILE structure: char *FileName; fopen() will save the file name and an accessor function will...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.