query-d685943f3c082d7871ffa6fa168df5c3
Synia: Company
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#>
PREFIX target: <http://www.wikidata.org/entity/Q3949497>
SELECT
?description ?descriptionLabel
?value ?valueLabel ?valueUrl
?wikidata ?wikidataUrl
WHERE {
{
BIND(1 AS ?order)
BIND(wd:Q783794 AS ?description)
target: rdfs:label ?value_string .
FILTER (LANG(?value_string) = 'en')
BIND(COALESCE(?value_string, SUBSTR(STR(target:), 32)) AS ?value)
BIND(CONCAT(SUBSTR(STR(target:), 32), " ↗") AS ?wikidata)
BIND(CONCAT("https://www.wikidata.org/wiki/", SUBSTR(STR(target:), 32)) AS ?wikidataUrl)
}
UNION
{
BIND(2 AS ?order)
BIND(wd:Q6256 AS ?description)
target: wdt:P17 ?value .
BIND(CONCAT("#country/", SUBSTR(STR(?value), 32)) AS ?valueUrl)
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
ORDER BY ?order
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?description"):::projected
v7("?order")
v4("?value"):::projected
v7("?valueUrl"):::projected
v2("?value_string")
v5("?wikidata"):::projected
v6("?wikidataUrl"):::projected
c2(["wd:Q3949497"]):::iri
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
bind0[/"'2^^xsd:integer'"/]
bind0 --as--o v7
bind1[/"'wd:Q6256'"/]
bind1 --as--o v7
c2 --"wdt:P17"--> v4
bind2[/"concat('#country/',substring(str(?value),'32^^xsd:integer'))"/]
v4 --o bind2
bind2 --as--o v7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f3[["?value_string = 'en'"]]
f3 --> v2
bind4[/"'1^^xsd:integer'"/]
bind4 --as--o v7
bind5[/"'wd:Q783794'"/]
bind5 --as--o v7
c2 --"rdfs:label"--> v2
bind6[/"?value_stringsubstring(str('wd:Q3949497'),'32^^xsd:integer')"/]
v2 --o bind6
bind6 --as--o v4
bind7[/"concat(substring(str('wd:Q3949497'),'32^^xsd:integer'),' ↗')"/]
bind7 --as--o v5
bind8[/"concat('https://www.wikidata.org/wiki/',substring(str('wd:Q3949497'),'32^^xsd:integer'))"/]
bind8 --as--o v6
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end