Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
Institutional Coding
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AG Bibliometrie
Institutional Coding
Commits
2b40b3aa
Commit
2b40b3aa
authored
5 months ago
by
Christopher Lenke
Browse files
Options
Downloads
Patches
Plain Diff
23.09.2024
parent
9c1c0606
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Procedures/build_tree_for_sector_pg.txt
+42
-0
42 additions, 0 deletions
Procedures/build_tree_for_sector_pg.txt
with
42 additions
and
0 deletions
Procedures/build_tree_for_sector_pg.txt
0 → 100644
+
42
−
0
View file @
2b40b3aa
-- DROP PROCEDURE christines_space.build_tree_for_sector_pg(int8);
CREATE OR REPLACE PROCEDURE christines_space.build_tree_for_sector_pg(my_sector bigint)
LANGUAGE plpgsql
AS $procedure$
BEGIN
EXECUTE 'drop table if exists processing.zwischen_sector_tree';
EXECUTE 'CREATE TABLE processing.zwischen_sector_tree as (
select uid_ from (
(select uid_ from basics.u_sector where domain_id='||my_sector||')) as d1
union
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
(select uid_ from basics.u_sector where domain_id='||my_sector||'))
union
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
(select uid_ from basics.u_sector where domain_id='||my_sector||')))
union
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
(select uid_ from basics.u_sector where domain_id='||my_sector||'))))
union
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
(select uid_ from basics.u_sector where domain_id='||my_sector||')))))
union
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_1 from basics.relation where type in (0,1) and uid_0 in (
select uid_ from basics.u_sector where domain_id='||my_sector||'))))))';
END;
$procedure$
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment