Skip to content

Instantly share code, notes, and snippets.

@MaraimElbadri
Created May 28, 2018 21:51
Show Gist options
  • Save MaraimElbadri/9dfca22a0effda30dd874998b5e1f2cc to your computer and use it in GitHub Desktop.
Save MaraimElbadri/9dfca22a0effda30dd874998b5e1f2cc to your computer and use it in GitHub Desktop.
DROP TABLE IF EXISTS customer_final;
CREATE TABLE customer_final AS
SELECT loc.accountId
, loc.city
, loc.state
, loc.zip
, sp.status
, COALESCE(sp.letterGrade, '---')
, COALESCE(sp.numberGrade, '---')
FROM location AS loc
, spending AS sp
WHERE (loc.accountId == sp.tracking_number);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment