For every Mastodon Admin, that wants to ban a big wave of users. (f. ex. spam wave).
Here a dump of commands for you.
Modify it for your need and execute in your DB
SELECT DISTINCT ON (a.domain, a.username) a.domain, a.username, s.uri, s.text, s.created_at, a.suspended_at