MySQL query to list users who never signed in

What MySQL query can I use to get a list of users who have never logged in to WP?

None. WordPress does not store this information so this is not something you can do, you would need to add code for it but that would also require going back to 2015 to add the code for it to solve your problem.

WordPress doesn’t hold records of previous/first/last logins, only current active sessions. These active session records are destroyed when a user logs out, and when the login expires. They’re also approximate, not accurate. This also means you can’t use them to figure out when a user was last active, when they last logged in, or if they have ever logged in.

At best, you could add code to log when a user logs in to user meta, then wait a few months and see who has and has not logged in. Then you would have the information needed to do this, and you would do it via WP_User_Query and wp_delete_user.

Right now though, you don’t have the information to do this. Note that doing it via SQL would mean stale caches and other broken-ness, you should do it via WordPress APIs, be that the REST API, CLI, or in PHP.