troubleshooting Question

SQL of Count of vendors paid over X amount since a specified date

Avatar of janthonyn
janthonyn asked on
Oracle Database
6 Comments2 Solutions409 ViewsLast Modified:
Need help with a sql of a count of vendors that have been paid and have total amount paid of greater than $10,000 since January 1, 2006. Here is my attempt:

select count(ac.vendor_id)
from ap_checks_all ac
where ac.vendor_id in (select ac.vendor_id
                ,sum(ac.check_amount)> '10000.00'
                from ap_checks_all ac
                    ,po_vendors pv
                where ac.vendor_id = pv.vendor_id
                and ac.check_date between '01-JAN-06' and '31-JUL-07'
                group by ac.vendor_id)
group by ac.vendor_id
-----------------------------
Running 11.5.10.2 Oracle Applications on an Oracle RDBMS 9.2.0.6.0


ASKER CERTIFIED SOLUTION
awking00
Information Technology Specialist

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

Join our community to see this answer!
Unlock 2 Answers 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 2 Answers 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