Project:RedirectionScript: Difference between revisions

From MaRDI portal
No edit summary
No edit summary
Line 10: Line 10:


</syntaxhighlight>
</syntaxhighlight>
=== Get mapping of original items to the ones they were redirected to ===
<syntaxhighlight lang="sparql">
SELECT DISTINCT ?o ?sa
WHERE
{
  ?o owl:sameAs ?sa .
}
</syntaxhighlight>
=== Get all items that redirect to somewhere else and are still referenced in another item ===

Revision as of 15:25, 29 February 2024

SPARQL queries

Count number of items that redirect to another item

SELECT (COUNT (DISTINCT ?o) AS ?count)
WHERE
{
   ?o owl:sameAs ?sa .
}

Get mapping of original items to the ones they were redirected to

SELECT DISTINCT ?o ?sa
WHERE
{
  ?o owl:sameAs ?sa .
}

Get all items that redirect to somewhere else and are still referenced in another item