Last active
December 14, 2020 17:36
-
-
Save mbraga-sfdc/b3efb9c4ae153113fb0f60c8b0ff82f3 to your computer and use it in GitHub Desktop.
data view for multi-org visibility for work.com blog post #3
This file contains 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
CREATE OR REPLACE VIEW global_assessment as | |
SELECT contact.sfid as id, industry, account.name, phone, fax, | |
lastname, firstname, email, mobilephone, | |
'AMER' AS geo | |
FROM amer.account, amer.contact | |
WHERE amer.account.sfid = amer.contact.accountid | |
UNION | |
SELECT contact.sfid as id, industry, account.name, phone, fax, | |
lastname, firstname, email, mobilephone, | |
'EMEA' AS geo | |
FROM emea.account, emea.contact | |
WHERE emea.account.sfid = emea.contact.accountid; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment