Overview
You would like to use a SQL query to determine the total member count for your Lyris LM server under various conditions such as when a list is disabled, subscribers are held, subscribers unsubscribe, or a list is deleted.
Solution
This solution uses a SQL query but this can also be done using the Lyris LM interface. See the Determining A Server's Total Member Count in Lyris LM article for details.
SELECT s.Name_, COUNT(m.EmailAddr_) FROM members_ m INNER JOIN lists_ l ON m.List_ = l.Name_ INNER JOIN topics_ t ON t.Title_ = l.Topic_ INNER JOIN sites_ s ON t.SiteName_ = s.Name_ GROUP BY s.Name_ ORDER BY s.Name_ ASC
This script will give you the total member count for each site in your LM instance.
Example output:
Membercount sitename
200 site1
300 site2
Note:
The total member count includes members in any status (Active, Held, Unsubscribed, etc.) even for disabled lists. If you delete a list, it will delete all members of that list and associated data.
The total member count includes members in any status (Active, Held, Unsubscribed, etc.) even for disabled lists. If you delete a list, it will delete all members of that list and associated data.