Sirdude
Registered: 04/19/07
Posts: 2077
Loc: SoCal, USA
just turn it around
Code:
select t1.USER_DISPLAY_NAME,count(t2.POST_ID) as total
from ubbt_POSTS as t2,
ubbt_USERS as t1
where length(t2.POST_BODY) > 400
and t1.USER_ID = t2.USER_ID
group by t2.USER_ID
having total > 5
order by total desc
limit 11
choose a different number than 400 to go for uber-lengthy
Sirdude
Registered: 04/19/07
Posts: 2077
Loc: SoCal, USA
Originally Posted By: Harold
What I'm really looking for is a query that will list and rank users by the absolute top number of characters in a post.
Code:
select t1.USER_DISPLAY_NAME as Name, count(t2.POST_ID) as Total, length(t2.POST_BODY) as CarpalTunnelSize from ubbt_POSTS as t2,
ubbt_USERS as t1
where t1.USER_ID = t2.USER_ID and length(t2.POST_BODY) > 65000
group by t2.USER_ID, CarpalTunnelSize
having Total > 0
order by CarpalTunnelSize desc, Total desc
limit 5
Code:
Name Total CarpalTunnelSize
yulee 5 65535
OiyOiy 1 65535
Sirdude 1 65070
Yoyo 1 65010
ro0t0os 1 64567
it pegs @ 65535, so i chose a number perty close (65000) ...