query-493f393ddbc93d7bf2563322b8c48b40
rescue (Q1341429) NOT human (Q5) SELECT DISTINCT ?item ?itemLabel ?countryLabel ?operating_areaLabel ?official_website WHERE { VALUES ?instances_of { wd:Q1341429 } VALUES ?fields_of_work { wd:Q1341429 } { ?item wdt:P101 ?fields_of_work. } UNION { ?item (p:P31/ps:P31/(wdt:P279*)) ?instances_of. } MINUS { ?item wdt:P31 wd:Q5. } OPTIONAL { ?item wdt:P17 ?country. } OPTIONAL { ?item wdt:P2541 ?operating_area. } OPTIONAL { ?item wdt:P856 ?official_website. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,fr,ru,es,ja,zh,ar". } } ORDER BY (?countryLabel) (?operating_areaLabel) LIMIT 5000
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# rescue (Q1341429) NOT human (Q5)
SELECT DISTINCT ?item ?itemLabel ?countryLabel ?operating_areaLabel ?official_website WHERE {
VALUES ?instances_of {
wd:Q1341429
}
VALUES ?fields_of_work {
wd:Q1341429
}
{ ?item wdt:P101 ?fields_of_work. }
UNION
{ ?item (p:P31/ps:P31/(wdt:P279*)) ?instances_of. }
MINUS { ?item wdt:P31 wd:Q5. }
OPTIONAL { ?item wdt:P17 ?country. }
OPTIONAL { ?item wdt:P2541 ?operating_area. }
OPTIONAL { ?item wdt:P856 ?official_website. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,fr,ru,es,ja,zh,ar". }
}
ORDER BY (?countryLabel) (?operating_areaLabel)
LIMIT 5000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?country")
v1("?countryLabel"):::projected
v4("?fields_of_work")
v3("?instances_of")
v5("?item"):::projected
v8("?official_website"):::projected
v7("?operating_area")
v2("?operating_areaLabel"):::projected
a1((" "))
a2((" "))
c13(["#91;AUTO_LANGUAGE#93;,en,de,fr,ru,es,ja,zh,ar"]):::literal
c11(["bd:serviceParam"]):::iri
c6(["wd:Q5"]):::iri
bind0[/VALUES ?instances_of/]
bind0-->v3
bind00(["wd:Q1341429"])
bind00 --> bind0
bind1[/VALUES ?fields_of_work/]
bind1-->v4
bind10(["wd:Q1341429"])
bind10 --> bind1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v5 --"p:P31"--> a1
a1 --"p:statement/P31"--> a2
a2 --"p:direct/P279"--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v5 --"p:direct/P101"--> v4
end
union0r <== or ==> union0l
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v5 --"p:direct/P31"--> c6
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P17".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P2541".-> v7
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P856".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end