Skip to content

Instantly share code, notes, and snippets.

@andreypopp
Created September 16, 2022 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreypopp/605a9f5fe67ce6593345baa24bad747d to your computer and use it in GitHub Desktop.
Save andreypopp/605a9f5fe67ce6593345baa24bad747d to your computer and use it in GitHub Desktop.
CREATE QUERY all_usernames AS
SELECT ?fields... FROM (
SELECT
user.is_active AS is_really_active,
...
FROM user
WHERE ?where:Bool
) AS user
LEFT JOIN (
SELECT ... FROM user
) AS user2
WHERE user.is_really_active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment