query-dc09e6eafa59376fb0b76c26789ed721
open data portals
SELECT ?item ?itemLabel ?countryLabel ?itemDescription ?owned_byLabel ?foundational_textLabel ?main_subjectLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?item wdt:P31 wd:Q27031827. OPTIONAL { ?item wdt:P127 ?owned_by. } OPTIONAL { ?item wdt:P457 ?foundational_text. } OPTIONAL { ?item wdt:P17 ?country. } OPTIONAL { ?item wdt:P921 ?main_subject. } } ORDER BY (?countryLabel) LIMIT 5000
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 bd: <http://www.bigdata.com/rdf#>
# open data portals
SELECT ?item ?itemLabel ?countryLabel ?itemDescription ?owned_byLabel ?foundational_textLabel ?main_subjectLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item wdt:P31 wd:Q27031827.
OPTIONAL { ?item wdt:P127 ?owned_by. }
OPTIONAL { ?item wdt:P457 ?foundational_text. }
OPTIONAL { ?item wdt:P17 ?country. }
OPTIONAL { ?item wdt:P921 ?main_subject. }
}
ORDER BY (?countryLabel)
LIMIT 5000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?country")
v1("?countryLabel"):::projected
v4("?foundational_text")
v2("?item"):::projected
v6("?main_subject")
v3("?owned_by")
c6(["wd:Q27031827"]):::iri
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v2 --"wdt:P31"--> c6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P127".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P457".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P17".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P921".-> v6
end