query-76269809e518532229e543428095a4fb
TODO
Use at
- https://query.wikidata.org/sparql
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
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
f1[["regex(str(?sitelink),'.wikipedia.org/wiki/')"]]
f1 --> v3
v2 --"wdt:P27"--> c6
v3 --"schema:about"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind3[/"count(?sitelink)"/]
v3 --o bind3
bind3 --as--o v4