query-f7b9ffdb39e4606aa74a0e43323b18eb
Commons notability
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
#defaultView:LineChart
SELECT ?bin (COUNT(*) AS ?cnt) WHERE {
{
SELECT ?item WHERE {
?item ^schema:about/schema:isPartOf <https://commons.wikimedia.org/>; wikibase:sitelinks 1; wdt:P31 wd:Q5 .
}
}.
BIND(CEIL(xsd:integer(SUBSTR(STR(?item), 33)) / 1000000) AS ?bin) .
?item wikibase:identifiers 0 .
OPTIONAL { [] ?any ?item . FILTER(?any != schema:about) }
FILTER(!BOUND(?any)) .
} GROUP BY ?bin ORDER BY ASC(?bin)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?any")
v4("?bin"):::projected
v4("?cnt")
v3("?item")
a2((" "))
a1((" "))
c9(["0^^xsd:integer"]):::literal
c5(["1^^xsd:integer"]):::literal
c3([https://commons.wikimedia.org/]):::iri
c7(["wd:Q5"]):::iri
f0[["not bound(?any)"]]
f0 --> v2
a1 --"schema:about"--> v3
a1 --"schema:isPartOf"--> c3
v3 --"wikibase:sitelinks"--> c5
v3 --"wdt:P31"--> c7
bind1[/"numeric-ceil(http://www.w3.org/2001/XMLSchema#integer(substring(str(?item),'33^^xsd:integer')) / '1000000^^xsd:integer')"/]
v3 --o bind1
bind1 --as--o v4
v3 --"wikibase:identifiers"--> c9
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a2 -->v2--> v3
end
bind3[/"count(*)"/]
bind3 --as--o v4