query-f2ad01207e6956dd2211d4fb62170a9f

rq turtle/ttl

PalotabarĂ¡t

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 ?itemDescription (COUNT(?sitelink) AS ?sitelinks) WHERE {
    ?item wdt:P27 wd:Q28 .
    OPTIONAL { ?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 ?itemDescription
ORDER BY ?sitelinks

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((" ")) c6(["wd:Q28"]):::iri c3([https://hu.wikipedia.org/]):::iri c8(["bd:serviceParam"]):::iri c10(["hu,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0a1 --"schema:about"--> e0v1 e0a1 --"schema:isPartOf"--> e0c3 e0v1("?item"):::projected e0a1((" ")):::projected e0c3([https://hu.wikipedia.org/]):::iri end f0--EXISTS--> f0e0 f0 --> a1 f0 --> c1 f0 --> v2 f0 --> c2 f0 --> c3 a1 --"schema:about"--> v2 a1 --"schema:isPartOf"--> c3 v2 --"wdt:P27"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:about".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind2[/"count(?sitelink)"/] v3 --o bind2 bind2 --as--o v4