473,656 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sum of Total Query

I've designed a query which merely counts the number of different types
of orders.
What I am after is a way of getting a Grand Total which will be the Sum
of all the totals.
It sounds simple enough, but I just cannot seem to get it working - I
designed the Query using the Query builder, but have put the SQL below
if it helps.

Any help / advice would be greatly appreciated.

Cheers

SELECT [Order Type (For Combo)].[Order Type], [Order
Link].[Re-Allocations], [Order Link].[Project Work], Count(*) AS Total
FROM [Order Type (For Combo)] INNER JOIN [Order Link] ON [Order Type
(For Combo)].[Order Type ID] = [Order Link].[Order Type ID]
GROUP BY [Order Type (For Combo)].[Order Type], [Order
Link].[Re-Allocations], [Order Link].[Project Work], [Order
Link].[Order Type ID]
HAVING ((([Order Link].[Re-Allocations])=No) AND (([Order
Link].[Project Work])=No));

Apr 12 '06 #1
1 3308
Try building a crosstab query from your query. Go to the query builder,
select Crosstab query and follow the wizard. Instead of selecting a
table, select the query that contains your totals. The crosstab query
will list those totals and total them for you at the end of each row.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Apr 12 '06 #2

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

Similar topics

3
7795
by: krystoffff | last post by:
Hi I would like to paginate the results of a query on several pages. So I use a query with a limit X offset Y to display X results on a page, ok. But for the first page, I need to run the same query with a count(*) to know how many pages I will get (number total of rows/ X). The problem is my query is very slow (maybe 5s) because there is much
3
4693
by: Impakt | last post by:
Hi all... I'm making a database which is a survey on coastal safety. One of the questions asked is what activities the respondant uses the coast for...I have the following: Fishing Surfing Swimming Walking
2
5643
by: phaddock4 | last post by:
Please help. GOAL: I hope to calculate a total amount in a TotalQuery (or field in the SubQuery?), based upon three field amounts in a SubQuery. STATUS: When I create an expression in the TotalQuery based upon SubQuery fields, e.g: Total: + +
2
35885
by: mhodkin | last post by:
I created a query in which I have grouped data by City. I wish to calculate the percent of each value, e.g. City/(Total count of all Cities), in tbe next column of the query. I can't seem to write the correct expression due to the "groupby" needed to group the city count in the first column. Any clues?
5
1262
by: deercreek | last post by:
I have the following sql query listed below. I show the out put be low that. I am trying to get this query to toatl and only show the line of information with the total on it. Do you have any ideas? SELECT ReserveWithPrice.reservationid, ReserveWithPrice.Site, ReserveWithPrice.SitePrice, MyQuery.Total FROM ReserveWithPrice INNER JOIN . AS MyQuery ON ReserveWithPrice.Reservationid = MyQuery.id ORDER BY ReserveWithPrice.Reservationid;
4
1426
by: mukeshhtrivedi | last post by:
I have TYPE field which has 3 data like HEAD, TRACK and PANEL. Now whenever any person works on HEAD we put 8 Hrs in HRS filed and in LABOR field it reflects the dollar value automatically like $160 (8*20=160).Now I want to display the total of Head, Track and Panel in following; Actual Cost for Head: (All head total should display here if I have more than one head work) Actual Cost for Track:(All head total should display here if I...
5
2489
by: solargovind | last post by:
Hi, I hve some problem in query. My query is too long and linked with many table which make you confusion. So, hereby i explain you my problem by below example. The tables and Fields are.. student tbl --------- stud_id stud_name
15
6165
klarae99
by: klarae99 | last post by:
I am working on an Inventory Database in Access 2003. I am working on a report that I could print when its time to file our State Sales Tax paperwork. The figures I need for this report are Total Sales(not including tax), the Amount of Sales Subject to Tax, and the Total Sales Including Tax, all gathered for a specific time period. I have a query (qrySalesTax) to find all sales within a specified date range that also calculates the Total...
2
1747
klarae99
by: klarae99 | last post by:
Hello, I am working in Access 2003 on an inventory database. Right now I am working on a report which will be used to fill in forms that our state requires periodically to collect taxes. Right now I have a query that determines the items that have sold between two dates and calculates the Gross Sales, Tax Collected and Sales Including Tax. This query is set up with the following SQL: SELECT tblCat.Categories, tblCat.TaxRate,...
1
1728
by: silversubey | last post by:
I am using a query to total hours (Cltbudget.CBudhours) and dollars (CltBudget.CBudFee) Grouped by client names (Cltbudget.CBudCltName). here is the Query: SELECT CltBudget.CBudCltName AS Client , SUM(CltBudget.CBudfee) AS 'Total Dollars' , SUM(CltBudget.CBudhours) AS 'Total Hours' FROM VPM.dbo.CltBudget CltBudget, CltDue WHERE CltBudget.CBudDueID = CltDue.CDID AND ((CltDue.CDTarget Between '01-01-2007' And '12-31-2008') AND...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8710
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7310
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
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 we have to send another system
2
1928
muto222
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.