query-3caf410561a2e2844d9bf0dd4e99802a

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?depicts ?count ?depictsLabel_en ?depictsLabel_es WHERE
{
   {

SELECT ?depicts (count(?file) as ?count) WHERE
{
   SERVICE bd:slice {
?file wdt:P180 ?depicts.
    bd:serviceParam bd:slice.offset 0 . # Start at item number (not to be confused with QID)
    bd:serviceParam bd:slice.limit 5000000 . # List this many items
  }
} group by ?depicts having (?count>100 && ?count<4000000) }  SERVICE <https://query.wikidata.org/sparql> {
    filter not exists {?depicts rdfs:label ?depictsLabel_es FILTER (lang(?depictsLabel_es) = 'es') }  
    OPTIONAL {?depicts rdfs:label ?depictsLabel_en FILTER (lang(?depictsLabel_en) = 'en') }
  }
} order by desc(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count"):::projected v3("?depicts"):::projected v5("?depictsLabel_en"):::projected v4("?depictsLabel_es"):::projected v2("?file") c7(["0^^xsd:integer"]):::literal c5(["bd:serviceParam"]):::iri c9(["5000000^^xsd:integer"]):::literal f0[["?count > '100^^xsd:integer'?count < '4000000^^xsd:integer'"]] f0 --> v4 subgraph s1["http://www.bigdata.com/rdf#slice"] style s1 stroke-width:4px; v2 --"wdt:P180"--> v3 c5 --"bd:slice.offset"--> c7 c5 --"bd:slice.limit"--> c9 end bind2[/"count(?file)"/] v2 --o bind2 bind2 --as--o v4 subgraph s2["https://query.wikidata.org/sparql"] style s2 stroke-width:4px; f3[["not "]] subgraph f3e0["Exists Clause"] e0f0[["?depictsLabel_es = 'es'"]] e0f0 --> e0v1 e0v2 --"rdfs:label"--> e0v1 e0v2("?depicts"):::projected e0v1("?depictsLabel_es"):::projected end f3--EXISTS--> f3e0 f3 --> v4 f3 --> v3 f3 --> c12 f4[["?depictsLabel_es = 'es'"]] f4 --> v4 v3 --"rdfs:label"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v5 end end