query-1dfbd96950983a91e04e0c0850b6c943

rq turtle/ttl

Andrew Gray SELECT ?item ?itemLabel WHERE { ?item wdt:P131 wd:Q22 . ?item wikibase:sitelinks ?linkcount . FILTER (?linkcount = 1) . # only include items with 1 or more sitelinks ?article schema:about ?item . ?article schema:inLanguage "fr" . ?article schema:isPartOf https://fr.wikipedia.org/ . SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr" } } GROUP BY ?item ?itemLabel

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Andrew Gray
SELECT ?item ?itemLabel WHERE {
    ?item wdt:P131 wd:Q22 . 
    ?item wikibase:sitelinks ?linkcount . FILTER (?linkcount = 1) .       # only include items with 1 or more sitelinks
    ?article schema:about ?item .
    ?article schema:inLanguage "fr" .
    ?article schema:isPartOf <https://fr.wikipedia.org/> .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr" }
}
GROUP BY ?item ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?article") v2("?item"):::projected v1("?linkcount") c9([https://fr.wikipedia.org/]):::iri c3(["wd:Q22"]):::iri c7(["fr"]):::literal c13(["en,fr"]):::literal c11(["bd:serviceParam"]):::iri f0[["?linkcount = '1^^xsd:integer'"]] f0 --> v1 v2 --"wdt:P131"--> c3 v2 --"wikibase:sitelinks"--> v1 v3 --"schema:about"--> v2 v3 --"schema:inLanguage"--> c7 v3 --"schema:isPartOf"--> c9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end