query-9f69b48a7f5e0da2707e77383e1f9a6f
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,s2333,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/", ""),',"""no/', ?enhet,'""",Q1770101,"""',?enhet,'""",+2022-02-17T00:00:00Z/11') as ?string) WHERE { ?item wdt:P2333 ?enhet. ?item p:P2333 ?statement. MINUS { ?item wdt:P1320 []. } MINUS { ?item wdt:P1454 wd:Q95999820.} MINUS { ?item wdt:P8545 [].} MINUS { ?statement pq:P4070 []. } }
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
#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,s2333,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/", ""),',"""no/', ?enhet,'""",Q1770101,"""',?enhet,'""",+2022-02-17T00:00:00Z/11') as ?string) WHERE {
?item wdt:P2333 ?enhet.
?item p:P2333 ?statement.
MINUS { ?item wdt:P1320 []. }
MINUS { ?item wdt:P1454 wd:Q95999820.}
MINUS { ?item wdt:P8545 [].}
MINUS { ?statement pq:P4070 []. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?enhet"):::projected
v1("?item"):::projected
v3("?statement")
v4("?string")
a1((" "))
a2((" "))
a3((" "))
c5(["wd:Q95999820"]):::iri
v1 --"p:direct/P2333"--> v2
v1 --"p:P2333"--> v3
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:direct/P1320"--> a1
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:direct/P1454"--> c5
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:direct/P8545"--> a2
end
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v3 --"p:qualifier/P4070"--> a3
end
bind4[/"concat(replace(str(?item),'http://www.wikidata.org/entity/',''),',"""no/',?enhet,'""",Q1770101,"""',?enhet,'""",+2022-02-17T00:00:00Z/11')"/]
v1 --o bind4
v2 --o bind4
bind4 --as--o v4