If you want to filter out Centers and Groups, add the following where
clause:

 

select cs.description, count(*) from customer c

 

join customer_state cs on  c.status_id=cs.status_id

 

where c.discriminator = 'CLIENT'

 

group by cs.description;

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Amy
Bensinger (Contractor)
Sent: Monday, December 10, 2007 3:52 PM
To: Developer
Subject: Re: [Mifos-developer] get the inactive customers list

 

Here you go:

 

select cs.description, count(*) from customer c

join customer_state cs on  c.status_id=cs.status_id

group by cs.description;

 

 

 

Mifos.org has a page on data base development, including links to the
schema diagrams:

http://mifos.org/developers/technical-orientation/mifos-database-develop
ment#database-schema-diagram

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of omar
bilani
Sent: Monday, December 10, 2007 6:13 PM
To: [email protected]
Subject: [Mifos-developer] get the inactive customers list

 

Hi, 

any one know the tables that i need to check in order to get a list of
all the customers and their status (active, closed, blacklisted..)

also if there is a map or a document that describe the database it would
be great, since i am now checking all the tables one by one..

thanks 

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Reply via email to