Skip to content

Instantly share code, notes, and snippets.

@Mr--John-Doe
Created October 29, 2021 08:02
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 Mr--John-Doe/377d6b49488b06f274349c7611652e91 to your computer and use it in GitHub Desktop.
Save Mr--John-Doe/377d6b49488b06f274349c7611652e91 to your computer and use it in GitHub Desktop.
SELECT a.id
, coalesce(someColumn, someColumn2) someColumn
, someOtherColumn
, oneOther
, andThenSome
, plusThisONe
FROM this_important_table as a
LEFT JOIN other_table as b
on id = _id
INNER JOIN some_other_table as c
on id = super_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment