query-c71cb1debfbbe4912af5c392f8a01648

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?numberItem ?type ?value (COUNT(*) AS ?cnt) WHERE {
   {
  SELECT ?numberItem ?type ?value WHERE {
    ?numberItem wdt:P31/wdt:P279 wd:Q12503; p:P1181/psv:P1181/wikibase:quantityAmount ?numericalValue .
    FILTER(?numericalValue > 9000) . # optional to prevent timeouts
#depending on the statement data type, un-comment one of the four following lines. You may have to adjust the FILTER value above to yield results.
    BIND(?numericalValue AS ?value) . BIND(wikibase:Quantity AS ?type) . # numerical data type properties
#    BIND(STR(?numericalValue) AS ?value) . BIND(wikibase:String AS ?type) . # string data type properties
#    BIND(STR(?numericalValue) AS ?value) . BIND(wikibase:ExternalId AS ?type) . # external-id data type properties; technically also plain strings
#    BIND(STRLANG(STR(?numericalValue), 'en') AS ?value) . BIND(wikibase:Monolingualtext AS ?type) . # monolingualtext data type properties for language code 'en'
  }
}.
  ?type ^wikibase:propertyType/wikibase:directClaim ?wdt .
  [] ?wdt ?value .
} GROUP BY ?numberItem ?type ?value HAVING (?cnt > 10)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?cnt") v3("?numberItem"):::projected v2("?numericalValue") v5("?type"):::projected v4("?value"):::projected v6("?wdt") a5((" ")) a1((" ")) a2((" ")) a3((" ")) a4((" ")) c5(["wd:Q12503"]):::iri f0[["?cnt > '10^^xsd:integer'"]] f0 --> v7 f1[["?numericalValue > '9000^^xsd:integer'"]] f1 --> v2 v3 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c5 v3 --"p:P1181"--> a2 a2 --"p:statement/value/P1181"--> a3 a3 --"wikibase:quantityAmount"--> v2 bind2[/"?numericalValue"/] v2 --o bind2 bind2 --as--o v4 bind3[/"'wikibase:Quantity'"/] bind3 --as--o v5 a4 --"wikibase:propertyType"--> v5 a4 --"wikibase:directClaim"--> v6 a5 -->v6--> v4 bind5[/"count(*)"/] bind5 --as--o v7