I would like to use a query to deduplicate resources using a unique id. An insert/delete - query doesn't work, because less nodes have to be created than are deleted. Is it possible to use something similar to this?
insert {
?new a mails:Account.
?new mails:hasID ?id.
?new rdfs:label ?label
}
where {
{
select distinct ?id ?label where {
?account a mails:Account.
?account mails:hasID ?id.
?account rdfs:label ?label
}
}
bind(bnode() as ?new)
{
delete where {
?account mails:hasID ?id
}
}
}