Talk:Q6621272

Latest comment: 1 year ago by Maundwiki in topic Script
description: no description
Useful links:
Classification of the class former municipality of Sweden (Q6621272)  View with Reasonator View with SQID
For help about classification, see Wikidata:Classification.
Parent classes (classes of items which contain this one item)
Subclasses (classes which contain special kinds of items of this class)
former municipality of Sweden⟩ on wikidata tree visualisation (external tool)(depth=1)
Generic queries for classes
See also

WikiProject Sweden

I have undone the changes from today. I do not understand why the changes was done that made a mess on a substantial number of items that uses this item as Intance of.Yger (talk) 14:10, 9 May 2019 (UTC)Reply

Script

edit

SELECT ?kommun ?kommunLabel WHERE {

  ?kommun p:P31 ?instanceOf.
  ?instanceOf ps:P31 wd:Q127448.
   MINUS { ?instanceOf pq:P582 ?slut_datum. }
   MINUS { ?kommun pq:P576 ?upphört_datum. }
 SERVICE wikibase:label { bd:serviceParam wikibase:language "sv". }

} LIMIT 1000

"MINUS { ?instanceOf pq:P582 ?slut_datum. }" tar bort kommner med P582 i som slutdatum i P31 men "MINUS { ?kommun pq:P576 ?upphört_datum. }" tar inte bort kommener trots att upphört datum finns i P576. Vad har jag missat? Slutresultated bör vara att oavsett var datumet står ska inte objektet komma med i listan. Maundwiki (talk) 20:32, 16 July 2023 (UTC)Reply

Uppdaterat script

edit

SELECT ?kommun ?kommunLabel WHERE {

  ?kommun p:P31 ?instanceOf.
  ?instanceOf ps:P31 wd:Q127448.
   MINUS { ?instanceOf pq:P582 ?slut_datum. }
   MINUS { ?kommun wdt:P576 ?upphört_datum. }
 SERVICE wikibase:label { bd:serviceParam wikibase:language "sv". }

} LIMIT 1000

Scriptet fungerar oavsett om datumet står i dissolved, abolished or demolished date (P576) eller i end time (P582) som qualifier till instance of (P31). Maundwiki (talk) 12:43, 23 July 2023 (UTC)Reply

Return to "Q6621272" page.