troubleshooting Question

filter data, find the duplicates, sum one column from duplicates, return all data where sum > #

Avatar of House_sparrow
House_sparrowFlag for United States of America asked on
DatabasesMicrosoft AccessSQL
6 Comments1 Solution278 ViewsLast Modified:
I have one table named TABLE: with columns: ID, YEAR, SPECIES, HARVEST, DATE

1) I need to restrict the records to SPECIES = X AND YEAR = Y
2) For those records I need to find all instances of a duplicate ID/DATE combination
3) For those duplicate ID/Date combinations I need to SUM the HARVEST
4) If SUM(HARVEST) > 100, then I want those records returned, if not then I don't want to see them.

I want the output to look like this:
ID     DATE                 HARVEST
3      12/12/200Y       55
3      12/12/200Y       55
4      01/03/200Y       60
4      01/03/200Y       10
4      01/03/200Y       40......etc

PLEASE HELP!  - Thanks!

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros