query-74d388e73f2ff6debb0a12fb3f6e517a
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?author_name_string (xsd:integer(?ordinal_string) AS ?ordinal_integer) WHERE {
VALUES ?item {wd:Q91546947}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
OPTIONAL
{
?item p:P2093 ?stm.
?stm ps:P2093 ?author_name_string.
?stm a wikibase:BestRank. # To select the same values as wdt:P2093
OPTIONAL { ?stm pq:P1545 ?ordinal_string. }
}
}
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?author_name_string"):::projected
v1("?item"):::projected
v5("?ordinal_integer")
v4("?ordinal_string"):::projected
v2("?stm")
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c8(["wikibase:BestRank"]):::iri
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q91546947"])
bind00 --> bind0
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:P2093".-> v2
v2 --"p:statement/P2093"--> v3
v2 --"a"--> c8
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1545".-> v4
end
end
bind1[/"http://www.w3.org/2001/XMLSchema#integer(?ordinal_string)"/]
v4 --o bind1
bind1 --as--o v5