Skip to content

Instantly share code, notes, and snippets.

@grahamgilbert
Created November 21, 2019 02:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahamgilbert/0ddb239a004fb2c2bbcda4a60d2b4d43 to your computer and use it in GitHub Desktop.
Save grahamgilbert/0ddb239a004fb2c2bbcda4a60d2b4d43 to your computer and use it in GitHub Desktop.
select username,uuid,uid,gid,description,directory, case WHEN uuid in (SELECT users.uuid FROM user_groups INNER JOIN users ON user_groups.uid = users.uid WHERE user_groups.gid = 80) THEN "admin" ELSE "standard" END AS user_type from users;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment