-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update/countries to show only if have role (#315)
- Loading branch information
Showing
5 changed files
with
54 additions
and
20 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CREATE OR REPLACE VIEW vw_countries_in_roles AS | ||
SELECT DISTINCT r.country | ||
FROM "Roles" r | ||
WHERE r.country IS NOT NULL AND LENGTH(r.country) > 0 AND r.ready = true; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CREATE OR REPLACE VIEW VW_SKILLS_IN_ROLES AS | ||
SELECT * | ||
FROM "Skills" | ||
WHERE id IN ( | ||
SELECT DISTINCT CAST(UNNEST("skillsId") AS INTEGER) AS skillId | ||
FROM "Roles" | ||
WHERE ready = true | ||
) | ||
ORDER BY name; |