Skip to content

Instantly share code, notes, and snippets.

@sqldeployhelmet
Last active October 4, 2018 16:37
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 sqldeployhelmet/f5ff8f9767bc119b529a444aa330c6b2 to your computer and use it in GitHub Desktop.
Save sqldeployhelmet/f5ff8f9767bc119b529a444aa330c6b2 to your computer and use it in GitHub Desktop.
A simple un-pivoted query
/* A list of contacts */
SELECT a.acctNo, c.name, c.email
FROM contacts c JOIN accounts a ON a.acctNo = c.acctNo
ORDER BY a.acctNo, c.contactNo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment