How to measure user growth over time? I have a client that is looking to measure how their drupal user accounts grow over time.

I currently have the http://drupal.org/project/chart module with the System Charts sub module enabled and this does provide a nice pie graph of the users as the system currently stands.

Has anyone found a solution for this? Integration with the charting API would be nice too ;)
You can use select count(*), DATE_FORMAT(FROM_UNIXTIME(created),'%m-%Y') as month from users group by MONTH(FROM_UNIXTIME(created));. This uses the created field of the users table. 

Edit:

In your code this should look something like

$result = db_query("SELECT count(*), DATE_FORMAT(FROM_UNIXTIME(created),'%m-%Y') AS month 
                    FROM {users} 
                    GROUP BY MONTH(FROM_UNIXTIME(created))");


This will return all new usercreations grouped by month. You could use other Date/Time Functions like DAY. But be carfull with the groups. The example above only works correct if you track the data of one year (because it does not group by year). Here is a more complex example:

$result = db_query("SELECT count(*), DATE_FORMAT(FROM_UNIXTIME(created),'%d-%m-%Y') AS month 
                    FROM {users} 
                    GROUP BY YEAR(FROM_UNIXTIME(created)),
                             MONTH(FROM_UNIXTIME(created)), 
                             DAY(FROM_UNIXTIME(created))");


I'm not entirely sure if there is a better solution to this. I can't help with the Integration into the charting API as I never used it.