Created
November 10, 2020 21:35
-
-
Save mbraga-sfdc/609ee80caed61d170a9ebd5215828ba3 to your computer and use it in GitHub Desktop.
Heroku aggregated data view from the Multi-org visibility for Work.com blog post
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 employeecrisisassessment.sfid AS id, | |
employeecrisisassessment.assessment, | |
employeecrisisassessment.assessmentdate, | |
employee.lastname, employee.firstname, | |
'geo designation' AS geo | |
FROM <schema name>.employeecrisisassessment, <schema name>.employee | |
WHERE employeecrisisassessment.employeeid = employee.sfid | |
UNION [repeated select for each of our other schemas]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment