query-8fba4635c3eec0d2922abce00c5649df
Et Wikidata kasus SELECT ?s ?p ?o ?oLabel WHERE { VALUES ?best { wikibase:BestRank } VALUES ?truthy { wikibase:NormalRank wikibase:PreferredRank } VALUES ?falsy { wikibase:DeprecatedRank } VALUES ?item { wd:Q671985 } ?item p:P27|p:P570|p:P20|p:P551 ?s. ?s ?p ?o. ?s wikibase:rank ?truthy. #?s rdf:type ?best. SERVICE wikibase:label { bd:serviceParam wikibase:language "nb,en". } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Et Wikidata kasus
SELECT ?s ?p ?o ?oLabel
WHERE {
VALUES ?best { wikibase:BestRank }
VALUES ?truthy { wikibase:NormalRank wikibase:PreferredRank }
VALUES ?falsy { wikibase:DeprecatedRank }
VALUES ?item { wd:Q671985 }
?item p:P27|p:P570|p:P20|p:P551 ?s.
?s ?p ?o.
?s wikibase:rank ?truthy.
#?s rdf:type ?best.
SERVICE wikibase:label { bd:serviceParam wikibase:language "nb,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?best")
v3("?falsy")
v4("?item")
v7("?o"):::projected
v6("?p"):::projected
v5("?s"):::projected
v2("?truthy")
c7(["bd:serviceParam"]):::iri
c9(["nb,en"]):::literal
bind0[/VALUES ?best/]
bind0-->v1
bind00(["wikibase:BestRank"])
bind00 --> bind0
bind1[/VALUES ?truthy/]
bind1-->v2
bind10(["wikibase:NormalRank"])
bind10 --> bind1
bind11(["wikibase:PreferredRank"])
bind11 --> bind1
bind2[/VALUES ?falsy/]
bind2-->v3
bind20(["wikibase:DeprecatedRank"])
bind20 --> bind2
bind3[/VALUES ?item/]
bind3-->v4
bind30(["wd:Q671985"])
bind30 --> bind3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v4 --"p:P551"--> v5
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v4 --"p:P20"--> v5
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v4 --"p:P570"--> v5
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"p:P27"--> v5
end
union0r <== or ==> union0l
end
v5 -->v6--> v7
v5 --"wikibase:rank"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end