query-1ede0bfab545d18bc4680fc18fc4552b

rq turtle/ttl

survey medium

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?med ?medLabel (count(?item) as ?count) (SAMPLE(?item) as ?sampleitem) WHERE {
 ?item wdt:P170 wd:Q381238 .   
 ?item wdt:P186 ?med .   
 SERVICE wikibase:label { bd:serviceParam wikibase:language "pl,pl" }
} group by ?med ?medLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?count") v1("?item"):::projected v2("?med"):::projected v4("?sampleitem") c7(["pl,pl"]):::literal c2(["wd:Q381238"]):::iri c5(["bd:serviceParam"]):::iri v1 --"wdt:P170"--> c2 v1 --"wdt:P186"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end bind2[/"count(?item)"/] v1 --o bind2 bind2 --as--o v3 bind3[/"sample(?item)"/] v1 --o bind3 bind3 --as--o v4