query-82e3ed1e289c5147e3d12c69ef5b0022
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
?item ?itemLabel ?P21 ?P21Label ?P172 ?P172Label ?article ?sitelink
WHERE {
?item wdt:P19/wdt:P131* wd:Q40430.
?item wdt:P31 wd:Q5 .
optional {?item wdt:P21 ?P21 .}
optional {?item wdt:P172 ?P172 .}
optional {?article schema:about ?item ;
schema:isPartOf <https://pt.wikipedia.org/> ;
schema:name ?sitelink .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],pt". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?P172"):::projected
v2("?P21"):::projected
v4("?article"):::projected
v1("?item"):::projected
v5("?sitelink"):::projected
a1((" "))
c3(["wd:Q40430"]):::iri
c13(["bd:serviceParam"]):::iri
c5(["wd:Q5"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,pt"]):::literal
c10([https://pt.wikipedia.org/]):::iri
v1 --"wdt:P19"--> a1
a1 --"wdt:P131"--> c3
v1 --"wdt:P31"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P21".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P172".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v1
v4 --"schema:isPartOf"--> c10
v4 --"schema:name"--> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end