query-5a0304eac2f28c13da65acebe7ade085
... SELECT ?item ?langLabel ?ACNPid ?ref ?ref2Label WHERE { wd:Q27718342 p:P407 ?statement; p:P6981 ?statement2. wd:Q27718342 rdfs:label ?item. FILTER (LANG(?item) = "it"). ?statement ps:P407 ?lang. ?statement2 ps:P6981 ?ACNPid. ?statement prov:wasDerivedFrom ?refnode. OPTIONAL {?refnode pr:P854 ?ref. } OPTIONAL {?refnode pr:P248 ?ref2.} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#...
SELECT ?item ?langLabel ?ACNPid ?ref ?ref2Label
WHERE
{
wd:Q27718342 p:P407 ?statement;
p:P6981 ?statement2.
wd:Q27718342 rdfs:label ?item.
FILTER (LANG(?item) = "it").
?statement ps:P407 ?lang.
?statement2 ps:P6981 ?ACNPid.
?statement prov:wasDerivedFrom ?refnode.
OPTIONAL {?refnode pr:P854 ?ref. }
OPTIONAL {?refnode pr:P248 ?ref2.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?ACNPid"):::projected
v1("?item"):::projected
v4("?lang")
v7("?ref"):::projected
v8("?ref2")
v6("?refnode")
v2("?statement")
v3("?statement2")
c12(["bd:serviceParam"]):::iri
c2(["wd:Q27718342"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?item = 'it'"]]
f0 --> v1
c2 --"p:P407"--> v2
c2 --"p:P6981"--> v3
c2 --"rdfs:label"--> v1
v2 --"p:statement/P407"--> v4
v3 --"p:statement/P6981"--> v5
v2 --"prov:wasDerivedFrom"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v6 -."p:reference/P854".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v6 -."p:reference/P248".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end