query-169a48fd2b1a3aafe20da397cd75e92d
2023-02-13 #151 projects SELECT ?property ?propertyLabel (COUNT(DISTINCT ?project) AS ?countedProjects) WHERE { # VALUES ?project {wd:Q107168936 wd:Q108902285 wd:Q107168829} # examples for testing ?project ((wdt:P1344|wdt:P166|wdt:P1411)/wdt:P361) wd:Q106748908; # part of DigAMus Awards wdt:P31 wd:Q106778540. # instance of digital museum project ?property wikibase:claim ?claim. ?project ?claim ?statement. SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de". } } GROUP BY ?property ?propertyLabel ORDER BY DESC (?countedProjects)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# 2023-02-13 #151 projects
SELECT
?property
?propertyLabel
(COUNT(DISTINCT ?project) AS ?countedProjects)
WHERE {
# VALUES ?project {wd:Q107168936 wd:Q108902285 wd:Q107168829} # examples for testing
?project ((wdt:P1344|wdt:P166|wdt:P1411)/wdt:P361) wd:Q106748908; # part of DigAMus Awards
wdt:P31 wd:Q106778540. # instance of digital museum project
?property wikibase:claim ?claim.
?project ?claim ?statement.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de". }
}
GROUP BY ?property ?propertyLabel
ORDER BY DESC (?countedProjects)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?claim")
v6("?countedProjects")
v2("?project"):::projected
v3("?property"):::projected
v5("?statement")
a1((" "))
c10(["bd:serviceParam"]):::iri
c12(["en,de"]):::literal
c5(["wd:Q106748908"]):::iri
c7(["wd:Q106778540"]):::iri
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;
v2 --"wdt:P1411"--> a1
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P166"--> a1
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P1344"--> a1
end
union0r <== or ==> union0l
end
a1 --"wdt:P361"--> c5
v2 --"wdt:P31"--> c7
v3 --"wikibase:claim"--> v4
v2 -->v4--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind1[/"count(?project)"/]
v2 --o bind1
bind1 --as--o v6