Hi @dung,
This isn’t quite like what you mention, but gives a lot of good options for identifying spam users via SQL: Collaborative list of spam user patterns - #2 by marc (note that some of the more up-to-date suggestions can be found later in the thread)
-Roger
PKP Team