Skip to content

Commit ed35118

Browse files
committed
Same trick by Hannah to get the OPTIONALs working, and with thanks to Adriano for getting this started
1 parent 38cd5fc commit ed35118

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scholia/app/templates/author_timeline.sparql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ SELECT ?label ?beginning ?ending ?education_degree_label WHERE {
2121
GROUP BY ?work
2222
}
2323
OPTIONAL {
24+
?work wdt:P50 target: .
2425
?citing_article wdt:P2860 ?work .
2526
}
2627
}
@@ -45,6 +46,7 @@ SELECT ?label ?beginning ?ending ?education_degree_label WHERE {
4546
GROUP BY ?work
4647
}
4748
OPTIONAL {
49+
?work wdt:P50 target: .
4850
?citing_article wdt:P2860 ?work .
4951
}
5052
}
@@ -69,6 +71,7 @@ SELECT ?label ?beginning ?ending ?education_degree_label WHERE {
6971
GROUP BY ?work
7072
}
7173
OPTIONAL {
74+
?work wdt:P50 target: .
7275
?citing_article wdt:P2860 ?work .
7376
}
7477
}
@@ -88,12 +91,15 @@ SELECT ?label ?beginning ?ending ?education_degree_label WHERE {
8891
FILTER (LANG(?education_label) = 'en')
8992
BIND (CONCAT("🦉 ", ?education_label) AS ?label)
9093
OPTIONAL {
94+
target: p:P69 ?education_statement .
9195
?education_statement pq:P580 ?beginning .
9296
}
9397
OPTIONAL {
98+
target: p:P69 ?education_statement .
9499
?education_statement pq:P582 ?ending .
95100
}
96101
OPTIONAL {
102+
target: p:P69 ?education_statement .
97103
?education_statement pq:P512 ?education_degree .
98104
?education_degree rdfs:label ?education_degree_label .
99105
FILTER (LANG(?education_degree_label) = 'en')
@@ -108,12 +114,15 @@ SELECT ?label ?beginning ?ending ?education_degree_label WHERE {
108114
BIND (CONCAT("🏠 ", ?affiliation_label) AS ?label)
109115
# OPTIONAL { ?affiliation wdt:P18 ?image }
110116
OPTIONAL {
117+
target: p:P1416 | p:P108 ?affiliation_statement .
111118
?affiliation_statement pq:P580 ?beginning .
112119
}
113120
OPTIONAL {
121+
target: p:P1416 | p:P108 ?affiliation_statement .
114122
?affiliation_statement pq:P582 ?ending .
115123
}
116124
OPTIONAL {
125+
target: p:P1416 | p:P108 ?affiliation_statement .
117126
?affiliation_statement pq:P512 ?affiliation_degree .
118127
?affiliation_degree rdfs:label ?affiliation_degree_label .
119128
FILTER (LANG(?affiliation_degree_label) = 'en')

0 commit comments

Comments
 (0)