Skip to content

Instantly share code, notes, and snippets.

@nopresnik
Last active May 6, 2024 05:50
Show Gist options
  • Select an option

  • Save nopresnik/090780f09d8cc49cfbdfbb317d833fa8 to your computer and use it in GitHub Desktop.

Select an option

Save nopresnik/090780f09d8cc49cfbdfbb317d833fa8 to your computer and use it in GitHub Desktop.

Revisions

  1. nopresnik revised this gist May 6, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion query.sql
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    SELECT o.Name, u.EmailAddress, u.FirstName, u.LastName, u.Status, u.CreatedAt
    SELECT o.Name AS 'OrganisationName', u.EmailAddress, u.FirstName, u.LastName, u.Status, u.CreatedAt
    FROM User u
    LEFT JOIN Organisation_User ou ON u.Id = ou.UserId
    LEFT JOIN Organisation o ON ou.OrganisationId = o.Id
  2. nopresnik renamed this gist May 6, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. nopresnik created this gist May 6, 2024.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    SELECT o.Name, u.EmailAddress, u.FirstName, u.LastName, u.Status, u.CreatedAt
    FROM User u
    LEFT JOIN Organisation_User ou ON u.Id = ou.UserId
    LEFT JOIN Organisation o ON ou.OrganisationId = o.Id
    WHERE ou.OrganisationId = 'RbVYBJSsqsRksbHC'
    AND u.Password IS NULL