query-ef6b00aa2c40b7d6af42f9249e9edc72
Todos recipientes ordens port
SELECT ?item ?itemLabel ?article
WHERE
{
{ ?item wdt:P166 ?rank .
?rank wdt:P361 ?order .
?order wdt:P31/wdt:P279* wd:Q193622 .
?order wdt:P17 wd:Q45.
?rank wdt:P17 wd:Q45.
?article schema:about ?item .
?article schema:isPartOf https://pt.wikipedia.org/ . #WP.pt
}
UNION
{ ?item wdt:P166 ?order . ?order wdt:P31/wdt:P279* wd:Q193622 . ?order wdt:P17 wd:Q45. ?article schema:about ?item . ?article schema:isPartOf https://pt.wikipedia.org/ . #WP.pt }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
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#>
#Todos recipientes ordens port
SELECT ?item ?itemLabel ?article
WHERE
{
{ ?item wdt:P166 ?rank .
?rank wdt:P361 ?order .
?order wdt:P31/wdt:P279* wd:Q193622 .
?order wdt:P17 wd:Q45.
?rank wdt:P17 wd:Q45.
?article schema:about ?item .
?article schema:isPartOf <https://pt.wikipedia.org/> . #WP.pt
}
UNION
{ ?item wdt:P166 ?order .
?order wdt:P31/wdt:P279* wd:Q193622 .
?order wdt:P17 wd:Q45.
?article schema:about ?item .
?article schema:isPartOf <https://pt.wikipedia.org/> . #WP.pt
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?article"):::projected
v1("?item"):::projected
v3("?order")
v2("?rank")
a1((" "))
a2((" "))
c7(["wd:Q45"]):::iri
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c5(["wd:Q193622"]):::iri
c10([https://pt.wikipedia.org/]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P166"--> v3
v3 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c5
v3 --"wdt:P17"--> c7
v4 --"schema:about"--> v1
v4 --"schema:isPartOf"--> c10
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P166"--> v2
v2 --"wdt:P361"--> v3
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
v3 --"wdt:P17"--> c7
v2 --"wdt:P17"--> c7
v4 --"schema:about"--> v1
v4 --"schema:isPartOf"--> c10
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end