query-d572398273bd7327f985837250bb5e79
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT (CONCAT(SAMPLE(?fileName), "|[[w:se:", ?itemLabel, "|<span style=color:red>", STR(?itemLabel), "</span>]]") as ?string) WHERE {
?item wdt:P31 wd:Q5 ; # human
wdt:P106 wd:Q639669 ; # occupation: musician
wikibase:sitelinks ?linkcount .
OPTIONAL {?item wdt:P18 ?image.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "se,nb,nn,da,en".
?item rdfs:label ?itemLabel.}
BIND(REPLACE(wikibase:decodeUri(STR(?image)), "http://commons.wikimedia.org/wiki/Special:FilePath/", "File:") as ?fileName) .
FILTER (?linkcount > 50)
MINUS {
?wse schema:about ?item .
?wse schema:isPartOf <https://se.wikipedia.org/>.
} # No article at sewiki
}
GROUP BY ?itemLabel
ORDER BY DESC(MAX(?linkcount))
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?_anon_42b5416610844a34809f33a099ae9de129225")
v5("?fileName")
v3("?image")
v2("?item")
v4("?itemLabel"):::projected
v1("?linkcount")
v8("?string")
v6("?wse")
a1((" "))
c5(["wd:Q639669"]):::iri
c9(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c11(["se,nb,nn,da,en"]):::literal
c15([https://se.wikipedia.org/]):::iri
f0[["?linkcount > '50^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P31"--> c3
v2 --"wdt:P106"--> c5
v2 --"wikibase:sitelinks"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
v2 --"rdfs:label"--> v4
end
bind1[/"replace(http://wikiba.se/ontology#decodeUri(str(?image)),'http://commons.wikimedia.org/wiki/Special:FilePath/','File:')"/]
v3 --o bind1
bind1 --as--o v5
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v6 --"schema:about"--> v2
v6 --"schema:isPartOf"--> c15
end
bind5[/"max(?linkcount)"/]
v1 --o bind5
bind5 --as--o v7
bind6[/"concat(,'|#91;#91;w:se:',?itemLabel,'|<span style=color:red>',str(?itemLabel),'</span>#93;#93;')"/]
null --o bind6
v4 --o bind6
bind6 --as--o v8