A set of SPARQL examples that are used in different TGX resources
List of publishers with the most retractions.
PREFIX wd: <http://wikidata.org/entity/>
PREFIX wdt: <http://wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT
(COUNT(DISTINCT ?work) AS ?works)
?publisher ?publisherLabel
(CONCAT("#publisher/", SUBSTR(STR(?publisher), 32)) AS ?publisherUrl)
?publisherDescription
WHERE {
?work wdt:P31 wd:Q45182324 ;
wdt:P1433 ?venue .
SERVICE <https://query-main.wikidata.org/sparql> {
{
SELECT DISTINCT ?venue ?publisher ?publisherLabel ?publisherDescription
WHERE {
?venue wdt:P123 ?publisher .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
}
}
} GROUP BY ?publisher ?publisherLabel ?publisherUrl ?publisherDescription
ORDER BY DESC(?works)
LIMIT 200