query-29efba923c3aad22a93f6bbb48b7fc3b
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 ?item ?itemLabel (group_concat(?lang;separator=", ") as ?languages) (group_concat(?rsl;separator=", ") as ?statuses) (group_concat(?a_n;separator=", ") as ?article_links) WHERE {
?item wdt:P31 wd:Q5.
?item wdt:P1142 wd:Q6199.
?sitelink schema:about ?item.
?sitelink wikibase:badge ?reviewedstatus.
?reviewedstatus rdfs:label ?rsl. filter(lang(?rsl)="en")
?sitelink schema:name ?sitelink_label .
?sitelink schema:inLanguage ?lang .
bind(concat("[[:",str(?lang),":", str(?sitelink_label), "|", str(?lang),"]]") as ?a_n)
VALUES ?reviewedstatus {
wd:Q17437796 # featured
wd:Q17437798 # good
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?item ?itemLabel
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?a_n"):::projected
v11("?article_links")
v3("?item"):::projected
v1("?itemLabel"):::projected
v7("?lang"):::projected
v9("?languages")
v9("?reviewedstatus")
v2("?rsl"):::projected
v4("?sitelink")
v6("?sitelink_label")
v10("?statuses")
c12(["bd:serviceParam"]):::iri
c5(["wd:Q6199"]):::iri
c3(["wd:Q5"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?rsl = 'en'"]]
f0 --> v2
v3 --"wdt:P31"--> c3
v3 --"wdt:P1142"--> c5
v4 --"schema:about"--> v3
v4 --"wikibase:badge"--> v9
v9 --"rdfs:label"--> v2
v4 --"schema:name"--> v6
v4 --"schema:inLanguage"--> v7
bind1[/"concat('#91;#91;:',str(?lang),':',str(?sitelink_label),'|',str(?lang),'#93;#93;')"/]
v7 --o bind1
v6 --o bind1
bind1 --as--o v8
bind2[/VALUES ?reviewedstatus/]
bind2-->v9
bind20(["wd:Q17437796"])
bind20 --> bind2
bind21(["wd:Q17437798"])
bind21 --> bind2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end
bind6[/"?lang"/]
v7 --o bind6
bind6 --as--o v9
bind7[/"?rsl"/]
v2 --o bind7
bind7 --as--o v10
bind8[/"?a_n"/]
v8 --o bind8
bind8 --as--o v11