query-0b4272c19cbbbde7d129e476ef4bf327

rq turtle/ttl

TODO

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#>
SELECT DISTINCT ?item ?itemLabel (COUNT(?sitelink) AS ?sitelinks) WHERE {
    ?item wdt:P27 wd:Q28 .
    ?sitelink schema:about ?item FILTER REGEX(STR(?sitelink), ".wikipedia.org/wiki/") .
    FILTER NOT EXISTS { [] schema:about ?item; schema:isPartOf <https://hu.wikipedia.org/> } .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "hu,en" }
}
GROUP BY ?item ?itemLabel
HAVING (?sitelinks = 1)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v3("?sitelink"):::projected v4("?sitelinks") a1((" ")) c7(["wd:Q28"]):::iri c4([https://hu.wikipedia.org/]):::iri c9(["bd:serviceParam"]):::iri c11(["hu,en"]):::literal f0[["?sitelinks = '1^^xsd:integer'"]] f0 --> v4 f1[["not "]] subgraph f1e0["Exists Clause"] e0a1 --"schema:about"--> e0v1 e0a1 --"schema:isPartOf"--> e0c3 e0v1("?item"):::projected e0a1((" ")):::projected e0c3([https://hu.wikipedia.org/]):::iri end f1--EXISTS--> f1e0 f1 --> a1 f1 --> c2 f1 --> v2 f1 --> c3 f1 --> c4 a1 --"schema:about"--> v2 a1 --"schema:isPartOf"--> c4 f2[["regex(str(?sitelink),'.wikipedia.org/wiki/')"]] f2 --> v3 v2 --"wdt:P27"--> c7 v3 --"schema:about"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind4[/"count(?sitelink)"/] v3 --o bind4 bind4 --as--o v4