It is currently difficult to query projects in such a way to find inactive projects. It would be nice it would be possible to query projects not just on their properties but also on what they are assigned to, how many members they have, etc.
This got morphed into "find archived projects more easily" and then a direct duplicate was filed, so I just merged all this and resolved T7969.
I do hear that there are other features requested here, like searching for projects based on how many members they have. If that is still something you need, please do file a new task or re open this one, and let us know what the problem(s) are that you are trying to solve with the missing features.
We haven't seen other requests for this and it doesn't seem very valuable to most installs. The definition of "inactive" is also subjective, and seems likely to vary from one user to another.
You could try querying the database directly, writing a script to help, or possibly using the Conduit API (although it may not provide enough information until after T5873).
Broadly, this feature request doesn't describe a problem, only a desired solution. Our ability to help solve problems is limited when we don't have enough information to understand them. See: