query-08ad42433423e94cdf32ba2eb899ef68

rq turtle/ttl

For use with QuickStatements

1. Run the Query (change to correct date first) and download as CSV

2. Go to QuickStatements and put the following up top: qid,P1320,S3452,s6460,s813

3. Open the CSV file and copy all that stuff under "string" and paste it under the text inserted at step 2

4. Press "Import CSV commands"

SELECT (CONCAT(replace(str(?item),"http://www.wikidata.org/entity/", ""),',"""se/', ?enhet,'""",Q16496287,"""',?enhet,'""",+2022-01-20T00:00:00Z/11') as ?string) WHERE { ?item wdt:P6460 ?enhet. MINUS { ?item wdt:P1320 []. } MINUS { ?item wdt:P31 wd:Q163740.} MINUS { ?item wdt:P31 wd:Q31883598.} MINUS { ?item wdt:P1454 wd:Q31883598.} MINUS { ?item wdt:P1454 wd:Q422007.} MINUS { ?item wdt:P31 wd:Q157031.} MINUS { ?item wdt:P31 wd:Q157031.} MINUS { ?item wdt:P31 wd:Q68295960.} MINUS { ?item wdt:P31 wd:Q20921398.} MINUS { ?item wdt:P31 wd:Q10674551.} MINUS { ?item wdt:P31 wd:Q48204.} }

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
#For use with QuickStatements
# 1. Run the Query (change to correct date first) and download as CSV 
# 2. Go to QuickStatements and put the following up top: qid,P1320,S3452,s6460,s813
# 3. Open the CSV file and copy all that stuff under "string" and paste it under the text inserted at step 2
# 4. Press "Import CSV commands"
SELECT (CONCAT(replace(str(?item),"http://www.wikidata.org/entity/", ""),',"""se/', ?enhet,'""",Q16496287,"""',?enhet,'""",+2022-01-20T00:00:00Z/11') as ?string) WHERE {
  ?item wdt:P6460 ?enhet.
  MINUS { ?item wdt:P1320 []. }
  MINUS { ?item wdt:P31 wd:Q163740.}
  MINUS { ?item wdt:P31 wd:Q31883598.}
  MINUS { ?item wdt:P1454 wd:Q31883598.}
  MINUS { ?item wdt:P1454 wd:Q422007.}
  MINUS { ?item wdt:P31 wd:Q157031.}
  MINUS { ?item wdt:P31 wd:Q157031.}
  MINUS { ?item wdt:P31 wd:Q68295960.}
  MINUS { ?item wdt:P31 wd:Q20921398.}
  MINUS { ?item wdt:P31 wd:Q10674551.}
  MINUS { ?item wdt:P31 wd:Q48204.} 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?enhet"):::projected v1("?item"):::projected v3("?string") a1((" ")) c4(["wd:Q163740"]):::iri c8(["wd:Q157031"]):::iri c12(["wd:Q48204"]):::iri c7(["wd:Q422007"]):::iri c9(["wd:Q68295960"]):::iri c10(["wd:Q20921398"]):::iri c5(["wd:Q31883598"]):::iri c11(["wd:Q10674551"]):::iri v1 --"wdt:P6460"--> v2 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P1320"--> a1 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c4 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c5 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P1454"--> c5 end subgraph minus4["MINUS"] style minus4 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P1454"--> c7 end subgraph minus5["MINUS"] style minus5 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c8 end subgraph minus6["MINUS"] style minus6 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c8 end subgraph minus7["MINUS"] style minus7 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c9 end subgraph minus8["MINUS"] style minus8 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c10 end subgraph minus9["MINUS"] style minus9 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c11 end subgraph minus10["MINUS"] style minus10 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c12 end bind11[/"concat(replace(str(?item),'http://www.wikidata.org/entity/',''),',"""se/',?enhet,'""",Q16496287,"""',?enhet,'""",+2022-01-20T00:00:00Z/11')"/] v1 --o bind11 v2 --o bind11 bind11 --as--o v3