There is a an easier query without grouping for this:
select count(*) from ubbt_USER_DATA where
USER_LAST_POST_TIME > UNIX_TIMESTAMP( CURRENT_DATE ) -86400 *30
for posting activity in the last 30 days
Replace USER_LAST_POST_TIME with USER_LAST_VISIT_TIME if "active" for you is also a user that logged in.
Small job to add this to the stats island.