query-61050105bd4beeda98707d5e400ef3ff

rq turtle/ttl

: For the first: Data Gamer@ 12:57, 10 July 2020 (UTC) play Data GamerThanks!!

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 ?gn ?gnLabel ?gnDescription ?ws ?nl (COUNT(?item) as ?count) (SAMPLE(?item) as ?sample) (SAMPLE(?itemLabel) as ?sampleLabel) 
{
    ?item wdt:P27 wd:Q229 .
    ?item wdt:P31 wd:Q5 .
    ?item wdt:P735 ?gn .
    OPTIONAL { ?gn wdt:P1705 ?nl }
    OPTIONAL { ?gn wdt:P282 / wdt:P506 ?ws }  
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?gn ?gnLabel ?gnDescription ?ws ?nl
ORDER BY DESC(?count) ?gn ?ws

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?count") v2("?gn"):::projected v4("?item"):::projected v6("?itemLabel"):::projected v5("?nl"):::projected v7("?sample") v8("?sampleLabel") v3("?ws"):::projected a1((" ")) c10(["bd:serviceParam"]):::iri c2(["wd:Q229"]):::iri c4(["wd:Q5"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal v4 --"wdt:P27"--> c2 v4 --"wdt:P31"--> c4 v4 --"wdt:P735"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1705".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P282".-> a1 a1 --"wdt:P506"--> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind3[/"count(?item)"/] v4 --o bind3 bind3 --as--o v7 bind4[/"sample(?item)"/] v4 --o bind4 bind4 --as--o v7 bind5[/"sample(?itemLabel)"/] v6 --o bind5 bind5 --as--o v8