query-fcd577e13ab97db3a18bf58b5ff9a6d2
Utvalg av entiteter uten P31 'tilfelle av' og P279 'underklasse av' SELECT DISTINCT ?item ?itemLabel ?itemDescription ?articleURI WHERE { #Utvalg ?item wdt:P17 wd:Q20. #Resten av spørringen OPTIONAL { ?inst ^wdt:P31 ?item. } OPTIONAL { ?super ^wdt:P279 ?item. } FILTER(!BOUND(?inst) && !BOUND(?super)) OPTIONAL { ?articleURI schema:about ?item; schema:isPartOf https://no.wikipedia.org/. } SERVICE wikibase:label { bd:serviceParam wikibase:language "nb,en". } } LIMIT 500
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Utvalg av entiteter uten P31 'tilfelle av' og P279 'underklasse av'
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?articleURI
WHERE {
#Utvalg
?item wdt:P17 wd:Q20.
#Resten av spørringen
OPTIONAL { ?inst ^wdt:P31 ?item. }
OPTIONAL { ?super ^wdt:P279 ?item. }
FILTER(!BOUND(?inst) && !BOUND(?super))
OPTIONAL {
?articleURI schema:about ?item;
schema:isPartOf <https://no.wikipedia.org/>.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "nb,en". }
}
LIMIT 500
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?articleURI"):::projected
v1("?inst")
v3("?item"):::projected
v2("?super")
c9(["bd:serviceParam"]):::iri
c7([https://no.wikipedia.org/]):::iri
c2(["wd:Q20"]):::iri
c11(["nb,en"]):::literal
f0[["not bound(?inst)not bound(?super)"]]
f0 --> v1
f0 --> v2
v3 --"wdt:P17"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P31".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P279".-> v2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v3
v4 --"schema:isPartOf"--> c7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end