query-4f9311108eed370557c1bb3e57c91c58

rq turtle/ttl

title:Swedish municipalities which changed their municipality identifier at some point

author:Salgo60 2021-09-11

SELECT DISTINCT ?item ?itemLabel ?kkod1 ?kkod2 ?svwp_artikel WHERE { ?item wdt:P525 ?kkod1 . ?item wdt:P525 ?kkod2 . FILTER ( ?kkod1<?kkod2 ) SERVICE wikibase:label { bd:serviceParam wikibase:language "sv". } OPTIONAL { ?svwp_artikel schema:about ?item; schema:isPartOf https://sv.wikipedia.org/ } } ORDER BY ?itemLabel

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Swedish municipalities which changed their municipality identifier at some point
#author:Salgo60 2021-09-11
SELECT DISTINCT ?item ?itemLabel ?kkod1 ?kkod2 ?svwp_artikel WHERE
{
  ?item wdt:P525 ?kkod1 .
  ?item wdt:P525 ?kkod2 .
  FILTER ( ?kkod1<?kkod2 )
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sv". }
  OPTIONAL { ?svwp_artikel schema:about ?item; schema:isPartOf <https://sv.wikipedia.org/> }
}
ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?item"):::projected v1("?itemLabel"):::projected v2("?kkod1"):::projected v3("?kkod2"):::projected v5("?svwp_artikel"):::projected c3(["bd:serviceParam"]):::iri c5(["sv"]):::literal c8([https://sv.wikipedia.org/]):::iri f0[["?kkod1 < ?kkod2"]] f0 --> v2 f0 --> v3 v4 --"wdt:P525"--> v2 v4 --"wdt:P525"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."schema:about".-> v4 v5 --"schema:isPartOf"--> c8 end