Client counts

0 views
Skip to first unread message

Toby Elliott

unread,
Sep 21, 2009, 6:57:17 PM9/21/09
to Weave Dev List
mysql> select temp.ct, count(*) from (select username, count(*) as ct
from wbo2 where collection = 'clients' group by username) as temp
group by temp.ct;
+----+----------+
| ct | count(*) |
+----+----------+
| 1 | 2395 |
| 2 | 1495 |
| 3 | 543 |
| 4 | 173 |
| 5 | 63 |
| 6 | 31 |
| 7 | 14 |
| 8 | 4 |
| 10 | 1 |
| 22 | 1 |
+----+----------+
10 rows in set (1 hour 20.61 sec)


Toby

Reply all
Reply to author
Forward
0 new messages