473,471 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

sum of sums

Hello, any help is appreciated.
Here is what I’m trying. I want a month to date total of bookings
based on a fiscal month.
I can isolate my records for the month and sum up the days so I wind
up with a list of days of the month with their bookings total for
that day. Like this
10/1/05 - $1000
10/2/05 - $5000
10/3/05 - $2000
And so on thru the month.
But I want the sum of month 10.
I have a line of code like “select sum(EXT_AMT) where month = “10””
What I need is sum(sum(EXT_AMT).
And that does not work.
Any suggestions? I thought to throw the results into a table then sum
the table.
Not sure how to do that either! I'm frustrated! Any help is
appreciated.
Thanks, Duane

Oct 19 '05 #1
2 6765
What about a subquery ? 8Just to show you an example

Select SUM(Col1)
FROM
(
select sum(EXT_AMT) Col1 where month = "10"
) SubQuery

HTH; Jens Suessmeyer.

Oct 19 '05 #2
Duane,

The statement “select sum(EXT_AMT) where month = '10'” would give just
one total. Maybe there is still a GROUP BY clause in the same query that
you need to remove.

Gert-Jan
Duane123 wrote:

Hello, any help is appreciated.
Here is what I’m trying. I want a month to date total of bookings
based on a fiscal month.
I can isolate my records for the month and sum up the days so I wind
up with a list of days of the month with their bookings total for
that day. Like this
10/1/05 - $1000
10/2/05 - $5000
10/3/05 - $2000
And so on thru the month.
But I want the sum of month 10.
I have a line of code like “select sum(EXT_AMT) where month = “10””
What I need is sum(sum(EXT_AMT).
And that does not work.
Any suggestions? I thought to throw the results into a table then sum
the table.
Not sure how to do that either! I'm frustrated! Any help is
appreciated.
Thanks, Duane

Oct 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: guyzdancin | last post by:
I have developed a parsing program to handle large csv files and compute sums. The program was developed and successfully tested using only String objects. I want replace String objects with ...
1
by: Hunter Hillegas | last post by:
I have just added a third table to a query and I am no longer getting the results I am expecting. Three Tables: CUSTINVOICEJOUR (Header Table) CUSTINVOICETRANS (Line Item Table) MARKUPTRANS...
9
by: rinmanb70 | last post by:
I have a table of transactions, some with past dates, some dated the current date, and some dated in the near future. On a report, I'm looking for a way to get four different sums using the...
8
by: DrewKull | last post by:
Hello, I have a query which sums check boxes (so 0 or -1) then Abs the sum so i can get the number of check box 'checked' per column... based on start and end date. SELECT Abs(Sum(CommCon)) AS ,...
3
by: tpdinh | last post by:
I have to evaluate the sum in the for-loop. How do i do that? Also, I need to print the partial sums using %e. Please help!
5
chunk1978
by: chunk1978 | last post by:
hey... can anyone show me how to calculate sums to the 2nd decimal only? like: 5.50 + 4.00 = 9.50 i seriously have zero idea and could defo use some help...thanks! <script...
8
by: RJMac | last post by:
I’m using ADO 2.6 in VB6 to read in data from a Union query (qryJoinBalanceData) in Access 2000. The Union query contains 3 sub-queries, each of which joins several tables, but they all generate...
1
by: wisemen | last post by:
I have a table with 2 columns, and .I want to run a query that will give me a cumulative sum of the no. of entries that have an <= and on the second column give me a cumulative sum of the no. of...
1
by: someusernamehere | last post by:
Hey people, I need to do some sistem in PHP and MySQL, I have do it a part but the other is the problem, basically is mathemetical operations, te user register something and after insert some...
3
by: theinsider2012 | last post by:
JAVA for Windows XP the question is: Write an application that shows the sum of 1 to n for every n from 1 to 50. That is, the program prints 1 (the sum of 1 alone), 3 (the sum of 1 and 2), 6...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
1
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.