473,387 Members | 1,890 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,387 software developers and data experts.

How do you average in a query?

31
I have a query that sorts data from a table based on a build type. Each build type has several designs, and each design has several bars associated with it. For each bar there is 42 to 64 different parts, and each part has data from 8 different electrical tests performed on it. How do you average the electrical test data so that my query comes out as a column for BAR#, DESIGN#, and a column for each electrical test that has the average for that test on that bar?
Feb 2 '10 #1
2 3168
In query design view right click in a field and select Totals. A new row will appear with group by in each column. Select the column you want to average then change the group by via the drop down to Average. Save and run the query.
Mar 24 '10 #2
NeoPa
32,556 Expert Mod 16PB
The SQL for your query would be similar to :
Expand|Select|Wrap|Line Numbers
  1. SELECT   [BAR#],
  2.          [DESIGN#],
  3.          Avg([Test1]) AS Test1Avg,
  4.          Avg([Test2]) AS Test2Avg,
  5.          Avg([Testn]) AS TestnAvg
  6.  
  7. FROM     [YourTable]
  8.  
  9. GROUP BY [BAR#],
  10.          [DESIGN#]
This doesn't mean Paul's answer is wrong by the way, it is simply saying the same thing but from a different perspective.
Mar 24 '10 #3

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

Similar topics

2
by: Karen | last post by:
I inserted this statement and it worked great for the customers that have no payment history, but for the customers that have a history and an open invoice, it still used today's date in the mix...
2
by: Wayne Aprato | last post by:
I've read most, if not all, of the posts on moving average and still can't find a simple solution to my problem (if a simple solution exists!) I have a table with 2 fields: Hours and Injuries. I...
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...
0
by: Rolan | last post by:
I know what I want to do regarding the average cost for inventory, but need some assistance to sort out some of the details to finalize an inventory table and query. Essentially, the information is...
5
by: Randy Harris | last post by:
How can I report an average of non zero values? If the values are: 5, 0, 6, 0, 4 I would like the result 5 (15 / 3), not 3 (15 / 5) Thanks for any help...
3
by: Tony Lennard | last post by:
I have several queries, which generate about 10 fields each a text field of length 2 (which contain effort and attainment grades), eg A2, B4, A3, A3. I am trying to calculate an 11th fields, which...
5
abouddan
by: abouddan | last post by:
Hi all I am working on an accounting project using MS Access 2000, that demands to calculate many fields in a spesific record. The problem: The query I am using returns many records and for each...
3
by: mochatrpl | last post by:
I am looking for a way to make a query / report display the running average for total dollars. I have already set up a query to provide totals dollars per day from which a report graphly shows...
0
by: SuzK | last post by:
I am trying to calculate in VBA in Access 2002 a moving average and update a table with the calculations. Fields in my WeeklyData table are Week Ending (date) ItemNbr (double) Sales Dollars...
12
by: denveromlp | last post by:
Hello, I'm new to Access and trying to calculate a rolling 12 month average from some time data. Each data point is a date and a measurement taken at that date. As far as I can tell, the only...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.