mysql> select UID,ucount from (select UID,count(ID) as ucount fro m article group by UID) as table1 where ucount>5; +-----------+--------+ | UID | ucount | +-----------+--------+ | 16 | 8 | +-----------+--------+ 1 row in set (0.00 sec)
select count(*) from (select count(*) as c from wp_users group by UID hav ing c>5) as t
m article group by UID) as table1 where ucount>5;
+-----------+--------+
| UID | ucount |
+-----------+--------+
| 16 | 8 |
+-----------+--------+
1 row in set (0.00 sec)
ing c>5) as t