Table Structure:
userid password adminlevel
- userid is BIGINT (UNIQUE)
- password is VARCHAR
- adminlevel is SMALLINT
How do I write a query to get a list of users with adminlevel greater than 0 whose password is being used on other accounts?
The query result must satisfy the following conditions:
- adminlevel > 0
- there are accounts other than itself where the same password is being used