From ad20c5efb2bf23a54b02223bdc0347e9c27cd727 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Fri, 20 Oct 2023 15:17:15 +0200 Subject: [PATCH] Remove empty administrative units (#341) --- ...17131126-remove-empty-bestuurseenheden.sparql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 config/migrations/2023/20231017131126-remove-empty-bestuurseenheden.sparql diff --git a/config/migrations/2023/20231017131126-remove-empty-bestuurseenheden.sparql b/config/migrations/2023/20231017131126-remove-empty-bestuurseenheden.sparql new file mode 100644 index 0000000..6d15f15 --- /dev/null +++ b/config/migrations/2023/20231017131126-remove-empty-bestuurseenheden.sparql @@ -0,0 +1,16 @@ +DELETE { + GRAPH ?h { + ?s ?p ?o . + } +} WHERE { + GRAPH ?g { + ?s a ; + ?p ?o . + + FILTER NOT EXISTS { + ?s ?np ?no . + FILTER (?np NOT IN (, ) ) + } + } + BIND(?g as ?h) +}