query-fc076821b4396df64d66a119d731833a
References used in an item
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?prop3Label ?cLabel ?statedinLabel ?propIDLabel ?refurl
?reftypeLabel (GROUP_CONCAT(DISTINCT ?propLabel; separator=", ") as ?claims)
{
SELECT DISTINCT ?prop ?propLabel ?prop3Label ?cLabel ?statedinLabel ?propIDLabel
?refurl
?reftypeLabel
{
wd:Q100000001 ?p ?st .
?prop wikibase:claim ?p .
?st ?ps ?a .
?a ?pr [] .
?prop2 wikibase:reference ?pr .
OPTIONAL { ?prop3 wikibase:reference ?pr . ?a ?pr ?c .
FILTER( ?pr != pr:P3865 && ?pr != pr:P854 && ?pr != pr:P813 && ?pr != pr:P248 )
FILTER NOT EXISTS { ?prop3 wikibase:propertyType wikibase:ExternalId }
}
OPTIONAL { ?a pr:P248 ?statedin }
OPTIONAL { ?propID wikibase:propertyType wikibase:ExternalId ; wikibase:reference ?pr0 . ?a ?pr0 [] }
OPTIONAL { ?a pr:P3865 ?reftype }
OPTIONAL { ?a pr:P854 ?refurl . BIND("y" as ?hasrefurl) }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}
GROUP BY ?prop3Label ?cLabel ?statedinLabel ?propIDLabel
?refurl
?reftypeLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?a")
v9("?c")
v17("?claims")
v15("?hasrefurl")
v3("?p")
v1("?pr")
v12("?pr0")
v5("?prop")
v8("?prop2")
v2("?prop3")
v11("?propID")
v16("?propLabel"):::projected
v6("?ps")
v13("?reftype")
v14("?refurl"):::projected
v4("?st")
v10("?statedin")
a1((" "))
a2((" "))
c7(["wd:Q100000001"]):::iri
c6(["wikibase:ExternalId"]):::iri
c11(["bd:serviceParam"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7 -->v3--> v4
v5 --"wikibase:claim"--> v3
v4 -->v6--> v7
v7 -->v1--> a1
v8 --"wikibase:reference"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wikibase:reference".-> v1
v7 -->v1--> v9
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v7 -."pr:P248".-> v10
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v11 -."wikibase:propertyType".-> c6
v11 --"wikibase:reference"--> v12
v7 -->v12--> a2
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v7 -."pr:P3865".-> v13
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v7 -."pr:P854".-> v14
bind0[/"'y'"/]
bind0 --as--o v15
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind2[/"?propLabel"/]
v16 --o bind2
bind2 --as--o v17