SELECT
    *
FROM
    post
WHERE
    site = $1
    AND (
        NOT $2
        OR NOT is_read
    )
ORDER BY
    date DESC,
    title
