query-a8527c4a1c0e47ef9bc0b35988658f07
added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end WHERE { ?capital p:P31 ?capitalStat. ?capitalStat ps:P31 wd:Q5119. OPTIONAL { ?capitalStat pq:P642 ?of. } OPTIONAL { ?capitalStat pq:P580 ?start. } OPTIONAL { ?capitalStat pq:P582 ?end. } MINUS { [] wdt:P36 ?capital. } SERVICE wikibase:label { bd:serviceParam wikibase: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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#added before 2016-10
SELECT ?capital ?capitalLabel ?ofLabel ?start ?end
WHERE
{
?capital p:P31 ?capitalStat.
?capitalStat ps:P31 wd:Q5119.
OPTIONAL { ?capitalStat pq:P642 ?of. }
OPTIONAL { ?capitalStat pq:P580 ?start. }
OPTIONAL { ?capitalStat pq:P582 ?end. }
MINUS { [] wdt:P36 ?capital. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
- https://www.wikidata.org/wiki/User:Amitie_10g/Sandbox/Wikidata:SPARQL_query_service/queries/examples/maintenance
- https://www.wikidata.org/wiki/User:Amitie_10g/Sandbox/Wikidata:SPARQL_query_service/queries/examples/maintenance/en
- https://www.wikidata.org/wiki/User:Amitie_10g/Sandbox/Wikidata:SPARQL_query_service/queries/examples/maintenance/es
- https://www.wikidata.org/wiki/User:Amitie_10g/Sandbox/Wikidata:SPARQL_query_service/queries/examples/maintenance/zh
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/cs
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/en
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/es
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/fr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/ja
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/nl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/pl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/sv
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/uk