query-1315bb4ed911c43821e178c832109d4b

rq turtle/ttl

National economy indicators: set most recent value as preferredproperties with more than one statement Sample country

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?p ?pLabel (COUNT(*) as ?count)
{
    wd:Q1025 ?wdt ?v .
    ?p wikibase:directClaim ?wdt .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?p ?pLabel
HAVING (?count > 1) 
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?count") v4("?p"):::projected v3("?v") v2("?wdt") c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q1025"]):::iri f0[["?count > '1^^xsd:integer'"]] f0 --> v5 c2 -->v2--> v3 v4 --"wikibase:directClaim"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end bind2[/"count(*)"/] bind2 --as--o v5