Last active
December 7, 2018 01:31
-
-
Save pooza/c405038268627070ecbc34198509c766 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
accounts.id | |
FROM accounts | |
LEFT JOIN users ON accounts.id=users.account_id | |
LEFT JOIN ( | |
SELECT | |
account_id | |
FROM blocks | |
WHERE target_account_id=1 | |
) AS blockers ON accounts.id=blockers.account_id | |
LEFT JOIN ( | |
SELECT | |
account_id | |
FROM mutes | |
WHERE target_account_id=1 | |
) AS muters ON accounts.id=muters.account_id | |
WHERE (accounts.domain IS NULL) | |
AND ((accounts.actor_type='Person') OR (accounts.actor_type IS NULL)) | |
AND (accounts.silenced='f') | |
AND (accounts.suspended='f') | |
AND (blockers.account_id IS NULL) | |
AND (muters.account_id IS NULL) | |
AND (users.disabled='f') | |
GROUP BY accounts.id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
管理者のアカウントIDを1として。