Established users with trust-level locked to 0 or 1

Established users with trust-level locked to 0 or 1:

-- [params]
-- int :min_visited_days = 30
-- int :min_posts = 1

SELECT 
    id AS user_id,
    manual_locked_trust_level,
    days_visited,
    post_count
FROM 
    users u JOIN
        user_stats us ON u.id = us.user_id
WHERE 
    manual_locked_trust_level IN (0,1) AND
    days_visited >= :min_visited_days AND
    post_count >= :min_posts AND
    (silenced_till IS NULL OR silenced_till < NOW()) AND
    (suspended_till IS NULL OR suspended_till < NOW())
ORDER BY 
    days_visited DESC
5 Likes