User_table (User_id, kullanıcı_adı), votes_table (id, User_id, vote_date, oy): tablolar
$sql = SELECT user_id, sum(votes) AS sumvotes, vote_date
FROM votes_table
WHERE vote_date > 1279749600
ORDER BY sumvotes DESC
LIMIT 10
$result = query($sql)
foreach user_id in $result
$sql = SELECT user_id, username
FROM user_table u
WHERE u.user_id = user_id
$result2 = query($sql)
somearray.add($result AND $result2)