query-9c422fb02ea67fc7c4d9080cb1ca18a3
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
(GROUP_CONCAT(?gohLabel; SEPARATOR="; ") AS ?guestofhonor)
(SAMPLE(?start) AS ?start)
(SAMPLE(?locLabel) AS ?locLabel)
(SAMPLE(?countryLabel) AS ?countryLabel)
(URI(CONCAT("https://community.fandom.com/index.php?title=w:c:", SAMPLE(?faid))) AS ?article)
WHERE {
VALUES ?aconv { wd:Q111529504 }
OPTIONAL { ?aconv wdt:P967 ?goh. }
OPTIONAL { ?aconv wdt:P580 ?start. }
OPTIONAL { ?aconv wdt:P17 ?country. }
OPTIONAL { ?aconv wdt:P276 ?loc. }
OPTIONAL { ?aconv wdt:P6262 ?faid. }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
?goh rdfs:label ?gohLabel.
?loc rdfs:label ?locLabel.
?country rdfs:label ?countryLabel.
}
}
GROUP BY ?aconv
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v10("?_anon_42b5416610844a34809f33a099ae9de182711"):::projected
v1("?aconv")
v12("?article")
v4("?country")
v12("?countryLabel"):::projected
v6("?faid")
v2("?goh")
v7("?gohLabel"):::projected
v11("?guestofhonor")
v5("?loc")
v12("?locLabel"):::projected
v12("?start"):::projected
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?aconv/]
bind0-->v1
bind00(["wd:Q111529504"])
bind00 --> bind0
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P967".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P580".-> v12
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P17".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P276".-> v5
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P6262".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
v2 --"rdfs:label"--> v7
v5 --"rdfs:label"--> v12
v4 --"rdfs:label"--> v12
end
bind6[/"sample(?faid)"/]
v6 --o bind6
bind6 --as--o v10
bind7[/"?gohLabel"/]
v7 --o bind7
bind7 --as--o v11
bind8[/"sample(?start)"/]
v12 --o bind8
bind8 --as--o v12
bind9[/"sample(?locLabel)"/]
v12 --o bind9
bind9 --as--o v12
bind10[/"sample(?countryLabel)"/]
v12 --o bind10
bind10 --as--o v12
bind11[/"concat('https://community.fandom.com/index.php?title=w:c:',)"/]
null --o bind11
bind11 --as--o v12