Last active
December 16, 2015 14:41
-
-
Save jeff/fb9991eaea4b887243b4 to your computer and use it in GitHub Desktop.
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
SELECT | |
au.id, | |
asceum1.stat_cat_entry AS location_home, | |
asceum2.stat_cat_entry AS location_property_tax | |
FROM actor.usr au | |
LEFT JOIN actor.stat_cat_entry_usr_map asceum1 ON (asceum1.stat_cat = 41 AND au.id = asceum1.target_usr) -- Location - Home | |
LEFT JOIN actor.stat_cat_entry_usr_map asceum2 ON (asceum2.stat_cat = 62 AND au.id = asceum2.target_usr) -- Location - Property Tax | |
WHERE au.home_ou IN (SELECT id FROM actor.org_unit_descendants(22)) | |
ORDER BY au.id | |
LIMIT 1000; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment