mysql> select count(*) from aminno_member where signupip!='' and signupip!='127.0.0.1'; +----------+ | count(*) | +----------+ | 35572434 | +----------+ 1 row in set (3 min 50.80 sec) mysql> select case when us_am_am_member.first_name='' then '' else 'NOT DELETED' end as FIRSTNAME, case when aminno_member.signupip='127.0.0.1' then '127.0.0.1' else '--' end as LOCALHOST, case when aminno_member.signupip='' then 'NULL' else '--' end as NULLIP, count(*) as PPL from us_am_am_member left join aminno_member on us_am_am_member.id=aminno_member.pnum group by FIRSTNAME, LOCALHOST, NULLIP; +---------------+-----------+--------+----------+ | FIRSTNAME | LOCALHOST | NULLIP | PPL | +---------------+-----------+--------+----------+ | | -- | -- | 115259 | | | -- | NULL | 238 | | | 127.0.0.1 | -- | 10 | | NOT DELETED | -- | -- | 15925142 | | NOT DELETED | -- | NULL | 383792 | | NOT DELETED | 127.0.0.1 | -- | 19121 | +---------------+-----------+--------+----------+ 6 rows in set (5 min 16.84 sec) total paid_delete = 115259+238+10 = 115507 total NOT DELETED = 15925142 + 383792 + 19121 = 16328055 % paid_delete (localhost) - 0.05% % paid_delete (null IP) - .06% % NOT_DELETED (localhost) - .1% % NOT_DELETED (null IP) - .1% mysql> select case when us_am_am_member.first_name='' then '' else 'NOT DELETED' end as FIRSTNAME, case when aminno_member.signupip like '127.%.%.%' then '127.x.x.x' else '--' end as LOCALHOST, case when aminno_member.signupip='' then 'NULL' else '--' end as NULLIP, case when aminno_member.signupip like '10.%.%.%' then '10.x.x.x' else '--' end as TENDOT, case when signupip like '192.168.%.%' then '192.168.x.x' else '--' end as 192DOT168DOT, count(*) as PPL from us_am_am_member left join aminno_member on us_am_am_member.id=aminno_member.pnum group by FIRSTNAME, LOCALHOST, NULLIP, TENDOT, 192DOT168DOT; +---------------+-----------+--------+----------+--------------+----------+ | FIRSTNAME | LOCALHOST | NULLIP | TENDOT | 192DOT168DOT | PPL | +---------------+-----------+--------+----------+--------------+----------+ | | -- | -- | -- | -- | 115246 | | | -- | -- | -- | 192.168.x.x | 1 | | | -- | -- | 10.x.x.x | -- | 11 | | | -- | NULL | -- | -- | 238 | | | 127.x.x.x | -- | -- | -- | 11 | | NOT DELETED | -- | -- | -- | -- | 15906063 | | NOT DELETED | -- | -- | -- | 192.168.x.x | 5843 | | NOT DELETED | -- | -- | 10.x.x.x | -- | 12104 | | NOT DELETED | -- | NULL | -- | -- | 383792 | | NOT DELETED | 127.x.x.x | -- | -- | -- | 20253 | +---------------+-----------+--------+----------+--------------+----------+ 10 rows in set (5 min 15.00 sec) mysql> select signupip,count(*) from aminno_member join us_am_am_member on aminno_member.pnum=us_am_am_member.id where signupip = '' or signupip='127.0.0.1' group by signupip; +-----------+----------+ | signupip | count(*) | +-----------+----------+ | | 384030 | | 127.0.0.1 | 19131 | +-----------+----------+ 2 rows in set (4 min 6.58 sec) mysql> select count(*) as PAID_DELETES from us_am_am_member where first_name=''; +--------------+ | PAID_DELETES | +--------------+ | 115507 | +--------------+ 1 row in set (34.66 sec) mysql> select pnum from aminno_member where signupip!='' order by pnum limit 10; +--------+ | pnum | +--------+ | 764786 | | 764787 | | 764788 | | 764789 | | 764790 | | 764791 | | 764792 | | 764793 | | 764794 | | 764795 | +--------+ mysql> select pnum from aminno_member where signupip='127.0.0.1' order by pnum limit 10; +--------+ | pnum | +--------+ | 767686 | | 772529 | | 775525 | | 777228 | | 783062 | | 787407 | | 791500 | | 792554 | | 797149 | | 797830 | +--------+ 10 rows in set (0.73 sec) mysql> select pnum from aminno_member where signupip='127.0.0.1' order by pnum desc limit 10; +----------+ | pnum | +----------+ | 37321792 | | 37320400 | | 37320117 | | 37319112 | | 37318542 | | 37318138 | | 37317934 | | 37317640 | | 37316737 | | 37316098 | +----------+ 10 rows in set (0.16 sec)