troubleshooting Question

SQL Sum Question

Avatar of steverguy
steverguy asked on
Microsoft Access
3 Comments1 Solution609 ViewsLast Modified:
I'm connecting to a QuickBooks database using ODBC and MS Access.  I'm trying to use SQL to pull data in a way quickbooks will not allow.  For example, I would like to get a list of people who in the past year have ordered 3 or more times with a value of over $x.

There are several feilds in the Sales Table, which seams to be the only table I'll need to get this information.  The names of the fields are:
1. ShipDate (determining when ordered)
2. Subtotal (determining what amount)
3. CustomerRefListID (the Customer's ID)

I'm kind of lost as to where to even begin.  

Select *, Sum(CustomerRefListID) as CustTotal from Sales WHERE  CustTotal > 3...

Of course I know this won't work, since CustTotal can't be determined like that...  Even if it could be I'm not sure I'm approaching it correctly.  Any advice, guidence or suggestions would be appreciated!!!

Thanks!
ASKER CERTIFIED SOLUTION
mcallarse

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 3 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 3 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