query-4de8d9f480f74567d1f0f8db113b1016
Most used properties on video game items
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?propertyItem ?propertyItemLabel ?propertyType (count(distinct ?item) as ?total) WHERE {
?item wdt:P31 wd:Q7889;
?propertyRel ?v.
?propertyItem wikibase:directClaim ?propertyRel.
?propertyItem rdfs:label ?propertyItemLabel
FILTER (lang(?propertyItemLabel) = "en").
?propertyItem wikibase:propertyType ?propertyType.
}
group by ?propertyItem ?propertyItemLabel ?propertyType
order by desc(?total)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v6("?propertyItem"):::projected
v2("?propertyItemLabel"):::projected
v4("?propertyRel")
v7("?propertyType"):::projected
v8("?total")
v5("?v")
c3(["wd:Q7889"]):::iri
f0[["?propertyItemLabel = 'en'"]]
f0 --> v2
v3 --"wdt:P31"--> c3
v3 -->v4--> v5
v6 --"wikibase:directClaim"--> v4
v6 --"rdfs:label"--> v2
v6 --"wikibase:propertyType"--> v7
bind2[/"count(?item)"/]
v3 --o bind2
bind2 --as--o v8