query-3a6d9eba17cb9f1e360b5f6547302338
Getting all properties of KB collection highlights
https://stackoverflow.com/questions/42076194/get-properties-from-a-group-of-items-in-with-sparql
SELECT DISTINCT ?property ?propLabel WHERE { ?item p:P195 ?st . ?st ps:P195 wd:Q1526131;pq:P2868 wd:Q29188408. ?item ?property []. ?prop wikibase:directClaim ?property . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } ORDER BY ?property
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
#Getting all properties of KB collection highlights
#https://stackoverflow.com/questions/42076194/get-properties-from-a-group-of-items-in-with-sparql
SELECT DISTINCT ?property ?propLabel WHERE {
?item p:P195 ?st .
?st ps:P195 wd:Q1526131;pq:P2868 wd:Q29188408.
?item ?property [].
?prop wikibase:directClaim ?property .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?property
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item")
v4("?prop")
v1("?property"):::projected
v3("?st")
a1((" "))
c8(["bd:serviceParam"]):::iri
c5(["wd:Q29188408"]):::iri
c10(["en"]):::literal
c3(["wd:Q1526131"]):::iri
v2 --"p:P195"--> v3
v3 --"p:statement/P195"--> c3
v3 --"p:qualifier/P2868"--> c5
v2 -->v1--> a1
v4 --"wikibase:directClaim"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end