Skip to content

Instantly share code, notes, and snippets.

@nopresnik
Last active May 6, 2024 05:50
Show Gist options
  • Save nopresnik/090780f09d8cc49cfbdfbb317d833fa8 to your computer and use it in GitHub Desktop.
Save nopresnik/090780f09d8cc49cfbdfbb317d833fa8 to your computer and use it in GitHub Desktop.
B2B redemption report
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
WHERE ou.OrganisationId = 'RbVYBJSsqsRksbHC'
AND u.Password IS NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment