<span style="font-size:14px;">{dede:sql sql="select u.id, u.uname, u.userid, u.usertype, (select count(*) from `dede_archives` where mid = u.id) as c
from `dede_admin` u where u.usertype < 10 group by u.userid order by c desc,u.userid asc;"}
<li><em class="n1">[field:global name=autoindex/]</em><span class="c1">[field:dd/]</span><a href="">[field:uname/]</a></li>
{/dede:sql}</span>