You are reading a single comment by @Velocio and its replies. Click here to read the full conversation.
  • select
    username,
    count(*) as numposts
    from
    posts p
    inner join
    users u
    on
    p.userid = u.id
    where
    p.id = 123456 and p.created > '5-aug-2011'
    group by
    u.id
    order by
    numposts desc

    more like:

    SELECT username, COUNT( * )
    FROM post
    WHERE threadid =13146
    AND dateline >=1312156800
    GROUP BY username
    ORDER BY 2 DESC
    LIMIT 0 , 30

    output (top 30):

    Mankind is doomed 334
    EEI 284
    horatio 243
    nuknow 212
    the lush 202
    whatok 144
    Oliver Schick 131
    Dammit 124
    Pistanator 115
    TS 107
    spotter 104
    clintsmoker 84
    Day-Moe 75
    prole art threat 75
    CasaSteve 72
    hippy 66
    Buffalo Bill 64
    Jimm 63
    ExTra 59
    dooks 57
    catfood 57
    dicki 56
    CowHen 56
    Manc Ronnie 56
    adoubletap 55
    wolfsangle23 53
    neu 52
    hugo7 49
    nailbrush 48
    Markyboy 45

About

Avatar for Velocio @Velocio started