query-9acfd1ec7894f34d53e3667752413a89

rq turtle/ttl

What are the TTRPG that cite the most?

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 ?works ?worksLabel (COUNT(DISTINCT ?citedworks) AS ?count) 
WHERE
{
    ?works wdt:P2860 ?citedworks. 
           ?citedworks wdt:P31 wd:Q1643932. 
    ?works wdt:P31 wd:Q1643932. 
    ?works wdt:P577 ?date.
    BIND ( STR(year(?date)) as ?year )
    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
    }
}
GROUP BY ?works ?worksLabel
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?citedworks"):::projected v6("?count") v4("?date") v2("?works"):::projected v5("?year") c6(["bd:serviceParam"]):::iri c3(["wd:Q1643932"]):::iri c8(["en"]):::literal v2 --"wdt:P2860"--> v3 v3 --"wdt:P31"--> c3 v2 --"wdt:P31"--> c3 v2 --"wdt:P577"--> v4 bind0[/"str(year-from-dateTime(?date))"/] v4 --o bind0 bind0 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind2[/"count(?citedworks)"/] v3 --o bind2 bind2 --as--o v6