Customer Counts by Branch

You can use the script below to find how many customers are in each branch.

select b.branch_code as "Query 4  - AR_Customer - Branch is Active - **Provide results to the customer to review for accuracy**", 

count(a.branch_id) as "Number of Customers in Active Branch"

from ar_customer a, ar_branch b

where a.branch_id=b.branch_id

and b.inactive='N'

and a.customer_id<>1

group by b.branch_code, a.branch_id