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

How to calculate record of similar values in one column.

Hi,
I am working in Query, Access 2010
I have two Columns in query, Like:

Column A
Column B

A
1
A
2
B
3
B
4
B
1

I want to show the total of A (3) and B(8) in column C

Please advice.
Thanks in advance
Oct 15 '14 #1
1 1097
twinnyfo
3,653 Expert Mod 2GB
Use an aggregate query with the Sum Function.

Expand|Select|Wrap|Line Numbers
  1. SELECT Sum([Column A]) AS SumOfA, 
  2.     Sum([Column B]) AS SumOfB 
  3. FROM [TableName] 
  4. GROUP BY [Column A];
There is no need to have a separate column for the totals.
Oct 15 '14 #2

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

Similar topics

0
by: Impakt | last post by:
Hello, I made a log book to record model rocket flights. The table to record each flight has 3 fields that allow you to select the type of motor used (some rockets can use more than one motor...
2
by: graycam | last post by:
E.G. I want to record sales. Three tables - TblProduct TblCust & TblSales TblCust fields = custID custName TblProducts fields = prodID prodName TblSales fields = salesID custID prodID If...
13
by: no.mail.pls | last post by:
Hiya, How do i retreive fields with similar values from 2 tables? I tried to use (1) "SELECT * FROM $table1 as o , $table2 as p WHERE o.name like '%p.name%'"; but it retrieves nothing at...
1
by: ILCSP | last post by:
Hello, I'm trying to accomplish 3 things with one stored procedure. I'm trying to search for a record in table X, use the outcome of that search to insert another record in table Y and then exec...
3
abehm
by: abehm | last post by:
SELECT (SUM(Hours)/EstimatedHours) AS Progress FROM Production.TimeLog, Config.ProjectConfig WHERE Production.TimeLog.ProjectConfigID = 1 I'm trying to calculate the progress of a task by adding...
1
by: Slapo | last post by:
Hello everyone, I could use some help with this function I've created (see below) that runs flawlessly on PostgreSQL 8.3.6 on my development machine but ends with an error on the production server...
2
by: chandhseke | last post by:
Hi Folks, In my code i need to preceed every amount value with a currency sign selected by a user. The drop down contains a list of currency values like USD(US Dollars), EUR(Euro), INR(Indian Rupee)...
2
by: shalskedar | last post by:
In the Ms Access 2003 database,in 1 of the Reports I need to display the records in the form of columns.. For ex-If the values are Elu Ela Res then this data is to be displayed as
1
by: vipulg | last post by:
I have an ms access database with table xyz in that there arre three coulmn .i want to do addition of my first column value . & that addition i want to display in vb 6.0 form which having...
1
by: Mehbub | last post by:
I had a table with 3 columns and 4 rows in website view. I need to add the column values and show at the bottom of the table as total. I'm using spring mvc3. How can I calculate the sum in JSP? am...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.