Query-ing a query

lmp101010

Registered User.
Local time
Today, 13:55
Joined
Feb 18, 2009
Messages
26
I will be eternally grateful if anyone can help with this.

I set up several tables in 2003 like the one listed below. (Named clicks, opens, fails etc.) Attached example

I then performed a query to combine the needed data in each table and set the criteria to extract part of the mailing name and give results based on criteria.

What I would like to do now write a query that includes a sum of each column in all the query's for a given date. (Not to be confused with the sum of the entire column). Anyone know the answer to this? Thanks
 

Attachments

Hi,

I'm not exactly sure what field you want to have a sum on but basically your query should look something like this:

SELECT SUM(column_1), SUM(column_2) [...]
FROM your_existing_query
GROUP BY the_date

That will group the record by each different date. I saw in your example that the time is included in the date, so it will group on that also. If you want to group on different day use something like this as the date in the GROUP BY statement:

format(the_date, 'MM/DD/YYYY') that will work assuming that your date is stored as "Date/Time" in our table.

If you need more help, feel free to ask!

Simon B.
 
Thanks for the reply Simon-

I'll give that a shot right now.
 
Hi,

I tried the query you suggested (or at least I think I did), and got an error. It was this.

SELECT [US Brown].[Unique click], [US Platinum].[Unique click], [US GameClub].[Unique click], [US Gold].[Unique click]
FROM [US Brown], [US GameClub], [US Gold], [US Platinum]
GROUP BY [US Platinum].[Mailing Date];

Can you tell me where I went wrong?

Thanks-
 

Users who are viewing this thread

Back
Top Bottom