Thanks for the reply.
In my database, I have a user account (winfas) aliased to dbo. When I run sp_helpuser in that database, I get two result sets. The first set shows all users that have some kind of access, including dbo and its login name (sa). The second result set has loginname "winfas" and usernamealiasedto "dbo". It is this part that I need.
When I ran your query, the only db_owner entry I had was rolename of "db_owner" and username of "dbo".
I just need to get all users aliased to dbo in any given database.
I just found sys.database_principal_aliases and got this:
select 'LoginName' = suser_sname(al.sid)
,'UserNameAliasedTo' = pr.name
from sys.database_principals pr, sys.database_principal_aliases al
where pr.principal_id = al.alias_principal_id
order by 1
To me it looks like this gives me what I need. Or at least it does for the database and the one alias that I have.