query-a3fe9a5cd4b6c8170622b4629caa100a

rq turtle/ttl

and it then lists what type of thing the item is - so we get multiple rows for the same item if it has a number of P31s. Tell us where you want this query to go next. (Your query ... entirely lacking any triples :)(Q755707)municipality of Norway or a (Q18663579)former municipality of Norway : so here's a first query for discussion. It finds anything which is either (or both of) a Pmt@: My initial Query goes like this Tagishsimon@

Use at

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#>
SELECT ?item ?itemLabel ?tidligere_norsk_kommune WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  { ?tidligere_norsk_kommune wdt:P31 wd:Q18663579. }
  UNION
  { ?tidligere_norsk_kommune wdt:P31 wd:Q755707. }
  UNION
  { ?tidligere_norsk_kommune wdt:P31 wd:Q19730508. }
  ?tidligere_norsk_kommune wdt:P17 wd:Q20.
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?tidligere_norsk_kommune"):::projected c7(["wd:Q755707"]):::iri c2(["bd:serviceParam"]):::iri c8(["wd:Q19730508"]):::iri c10(["wd:Q20"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal c6(["wd:Q18663579"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c8 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c7 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c6 end union0r <== or ==> union0l end v1 --"wdt:P17"--> c10