• Okay, here's a simple one:

    SELECT

    *

    FROM

    sys.server_principals AS SP

    WHERE

    type IN ('U','G')