Created
          May 28, 2018 21:51 
        
      - 
      
- 
        Save MaraimElbadri/9dfca22a0effda30dd874998b5e1f2cc to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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