query-b6407e745297c0c01c347c50ffd75cff

rq turtle/ttl

This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } } This query has two different features:

First, it is able to search for municipalities which are part of two different states, looking to P527

Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.

SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { ?udalerri p:P31 ?status. ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 . {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737} MINUS {?status pq:P582 ?old .} SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". } }

Use at

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#>
# This query has two different features:
# First, it is able to search for municipalities which are part of two different states, looking to P527
# Second, it doesn't show former municipalities, filtering the old ones from the P582 statement.
SELECT DISTINCT ?udalerri ?udalerriLabel WHERE { 
  ?udalerri p:P31 ?status.
  ?udalerri wdt:P131*/^wdt:P527 wd:Q47588 .
  {?status ps:P31 wd:Q484170.} UNION {?status ps:P31 wd:Q2074737}
  MINUS {?status pq:P582 ?old .}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?old") v2("?status") v1("?udalerri"):::projected a1((" ")) c7(["wd:Q2074737"]):::iri c10(["bd:serviceParam"]):::iri c3(["wd:Q47588"]):::iri c6(["wd:Q484170"]):::iri c12(["eu,es,fr,en"]):::literal v1 --"p:P31"--> v2 v1 --"p:direct/P131"--> a1 c3 --"p:direct/P527"--> a1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"p:statement/P31"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"p:statement/P31"--> c6 end union0r <== or ==> union0l end subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v2 --"p:qualifier/P582"--> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end