Query sums problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to gather the following info: all donors who have given $100 or
more throughout the year. Currently the way I am writing the criteria the
results reflect any one time gift over $100 or more.
I am sure I am just skipping a simple step. Can anyone help?

Thank you!
 
Open the query in design view. Click on the menu VIEW - SQL View. This
opens another window that has the SQL statement. Highlight, copy and paste
in a post.
 
I don't know what the SQL statement for analysis is. I designed a select
query using the design wizard.
 
HAVING (((Sum([Donation History].[Donation Amount]))>=100) AND (([Donation
History].[Donation Type]) Like "2005 Annual Appeal*" Or ([Donation
History].[Donation Type]) Like "Other*" Or ([Donation History].[Donation
Type]) Like "Other: Membership*" Or ([Donation History].[Donation Type]) Like
"Honorarium*" Or ([Donation History].[Donation Type]) Like "Memorial*" Or
([Donation History].[Donation Type]) Like "Capital Campaign*"));

I only copied the statement refering to the donation sum,. Let me know if
I should post the whole SQL query.
Thank you
 
Post the whole SQL statement.

jkb0152 said:
HAVING (((Sum([Donation History].[Donation Amount]))>=100) AND (([Donation
History].[Donation Type]) Like "2005 Annual Appeal*" Or ([Donation
History].[Donation Type]) Like "Other*" Or ([Donation History].[Donation
Type]) Like "Other: Membership*" Or ([Donation History].[Donation Type]) Like
"Honorarium*" Or ([Donation History].[Donation Type]) Like "Memorial*" Or
([Donation History].[Donation Type]) Like "Capital Campaign*"));

I only copied the statement refering to the donation sum,. Let me know if
I should post the whole SQL query.
Thank you

KARL DEWEY said:
Open the query in design view. Click on the menu VIEW - SQL View. This
opens another window that has the SQL statement. Highlight, copy and paste
in a post.
 
SELECT [Members and Donors].[Member Number], [Members and Donors].[Title 1],
[Members and Donors].[First 1], [Members and Donors].[Last 1], [Members and
Donors].[Title 2], [Members and Donors].[First 2], [Members and Donors].[Last
2], Sum([Donation History].[Donation Amount]) AS [SumOfDonation Amount],
[Members and Donors].Company, [Members and Donors].[Member Code], [Members
and Donors].[Do Not Publish Name], [Members and Donors].[Do Not Publish
Amount], [Donation History].[Donation Type]
FROM [Members and Donors] INNER JOIN [Donation History] ON [Members and
Donors].[Member Number] = [Donation History].[Member Number]
WHERE ((([Donation History].[Donation Date]) Between #1/1/2005# And
#12/31/2005#))
GROUP BY [Members and Donors].[Member Number], [Members and Donors].[Title
1], [Members and Donors].[First 1], [Members and Donors].[Last 1], [Members
and Donors].[Title 2], [Members and Donors].[First 2], [Members and
Donors].[Last 2], [Members and Donors].Company, [Members and Donors].[Member
Code], [Members and Donors].[Do Not Publish Name], [Members and Donors].[Do
Not Publish Amount], [Donation History].[Donation Type], [Members and
Donors].[Member Type (view only)]
HAVING (((Sum([Donation History].[Donation Amount]))>=100) AND (([Donation
History].[Donation Type]) Like "2005 Annual Appeal*" Or ([Donation
History].[Donation Type]) Like "Other*" Or ([Donation History].[Donation
Type]) Like "Other: Membership*" Or ([Donation History].[Donation Type]) Like
"Honorarium*" Or ([Donation History].[Donation Type]) Like "Memorial*" Or
([Donation History].[Donation Type]) Like "Capital Campaign*"));


KARL DEWEY said:
Post the whole SQL statement.

jkb0152 said:
HAVING (((Sum([Donation History].[Donation Amount]))>=100) AND (([Donation
History].[Donation Type]) Like "2005 Annual Appeal*" Or ([Donation
History].[Donation Type]) Like "Other*" Or ([Donation History].[Donation
Type]) Like "Other: Membership*" Or ([Donation History].[Donation Type]) Like
"Honorarium*" Or ([Donation History].[Donation Type]) Like "Memorial*" Or
([Donation History].[Donation Type]) Like "Capital Campaign*"));

I only copied the statement refering to the donation sum,. Let me know if
I should post the whole SQL query.
Thank you

KARL DEWEY said:
Open the query in design view. Click on the menu VIEW - SQL View. This
opens another window that has the SQL statement. Highlight, copy and paste
in a post.

:

I don't know what the SQL statement for analysis is. I designed a select
query using the design wizard.

:

Post your SQL statement for analysis.

:

I am trying to gather the following info: all donors who have given $100 or
more throughout the year. Currently the way I am writing the criteria the
results reflect any one time gift over $100 or more.
I am sure I am just skipping a simple step. Can anyone help?

Thank you!
 
This will get you moving --
SELECT [Members and Donors].[Member Number], [Members and Donors].[Title 1],
[Members and Donors].[First 1], [Members and Donors].[Last 1], [Members and
Donors].[Title 2], [Members and Donors].[First 2], [Members and Donors].[Last
2], [Members and Donors].Company, [Members and Donors].[Member Code],
Sum([Donation History].[Donation Amount]) AS [SumOfDonation Amount], [Members
and Donors].[Do Not Publish Name], [Members and Donors].[Do Not Publish
Amount], [Donation History].[Donation Type]
FROM [Members and Donors] INNER JOIN [Donation History] ON [Members and
Donors].[Member Number] = [Donation History].[Member Number]
WHERE ((([Donation History].[Donation Date]) Between #1/1/2005# And
#12/31/2005#))
GROUP BY [Members and Donors].[Member Number], [Members and Donors].[Title
1], [Members and Donors].[First 1], [Members and Donors].[Last 1], [Members
and Donors].[Title 2], [Members and Donors].[First 2], [Members and
Donors].[Last 2], [Members and Donors].Company, [Members and Donors].[Member
Code], [Members and Donors].[Do Not Publish Name], [Members and Donors].[Do
Not Publish Amount], [Donation History].[Donation Type]
HAVING (((Sum([Donation History].[Donation Amount]))>=100) AND (([Donation
History].[Donation Type]) Like "2005 Annual Appeal*" Or ([Donation
History].[Donation Type]) Like "Other*" Or ([Donation History].[Donation
Type]) Like "Other: Membership*" Or ([Donation History].[Donation Type]) Like
"Honorarium*" Or ([Donation History].[Donation Type]) Like "Memorial*" Or
([Donation History].[Donation Type]) Like "Capital Campaign*"));

You can not have something like -- [Members and Donors].[Member Type (view
only)]


jkb0152 said:
SELECT [Members and Donors].[Member Number], [Members and Donors].[Title 1],
[Members and Donors].[First 1], [Members and Donors].[Last 1], [Members and
Donors].[Title 2], [Members and Donors].[First 2], [Members and Donors].[Last
2], Sum([Donation History].[Donation Amount]) AS [SumOfDonation Amount],
[Members and Donors].Company, [Members and Donors].[Member Code], [Members
and Donors].[Do Not Publish Name], [Members and Donors].[Do Not Publish
Amount], [Donation History].[Donation Type]
FROM [Members and Donors] INNER JOIN [Donation History] ON [Members and
Donors].[Member Number] = [Donation History].[Member Number]
WHERE ((([Donation History].[Donation Date]) Between #1/1/2005# And
#12/31/2005#))
GROUP BY [Members and Donors].[Member Number], [Members and Donors].[Title
1], [Members and Donors].[First 1], [Members and Donors].[Last 1], [Members
and Donors].[Title 2], [Members and Donors].[First 2], [Members and
Donors].[Last 2], [Members and Donors].Company, [Members and Donors].[Member
Code], [Members and Donors].[Do Not Publish Name], [Members and Donors].[Do
Not Publish Amount], [Donation History].[Donation Type], [Members and
Donors].[Member Type (view only)]
HAVING (((Sum([Donation History].[Donation Amount]))>=100) AND (([Donation
History].[Donation Type]) Like "2005 Annual Appeal*" Or ([Donation
History].[Donation Type]) Like "Other*" Or ([Donation History].[Donation
Type]) Like "Other: Membership*" Or ([Donation History].[Donation Type]) Like
"Honorarium*" Or ([Donation History].[Donation Type]) Like "Memorial*" Or
([Donation History].[Donation Type]) Like "Capital Campaign*"));


KARL DEWEY said:
Post the whole SQL statement.

jkb0152 said:
HAVING (((Sum([Donation History].[Donation Amount]))>=100) AND (([Donation
History].[Donation Type]) Like "2005 Annual Appeal*" Or ([Donation
History].[Donation Type]) Like "Other*" Or ([Donation History].[Donation
Type]) Like "Other: Membership*" Or ([Donation History].[Donation Type]) Like
"Honorarium*" Or ([Donation History].[Donation Type]) Like "Memorial*" Or
([Donation History].[Donation Type]) Like "Capital Campaign*"));

I only copied the statement refering to the donation sum,. Let me know if
I should post the whole SQL query.
Thank you

:

Open the query in design view. Click on the menu VIEW - SQL View. This
opens another window that has the SQL statement. Highlight, copy and paste
in a post.

:

I don't know what the SQL statement for analysis is. I designed a select
query using the design wizard.

:

Post your SQL statement for analysis.

:

I am trying to gather the following info: all donors who have given $100 or
more throughout the year. Currently the way I am writing the criteria the
results reflect any one time gift over $100 or more.
I am sure I am just skipping a simple step. Can anyone help?

Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top