-
-
Save jeff/6318b9a5a84d26b9e7b9 to your computer and use it in GitHub Desktop.
Popular Holdshelf Aliases
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
-- popular holdshelf aliases at org unit 22 and its descendants | |
SELECT COUNT(*), UPPER(alias) AS alias | |
FROM actor.usr au | |
WHERE alias <> '' | |
AND alias IS NOT NULL | |
AND home_ou IN (SELECT id FROM actor.org_unit_descendants(22)) | |
GROUP BY UPPER(alias) | |
HAVING COUNT(*) > 1 | |
ORDER BY COUNT(*), UPPER(alias); | |
-- count | alias | |
-- -------+------------ | |
-- 2 | CATWOMAN | |
-- 2 | THE DOCTOR | |
-- (2 rows) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment