Project:RedirectionScript: Difference between revisions
From MaRDI portal
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
=== Get all items that redirect to somewhere else and are still referenced in another item === | === Get all items that redirect to somewhere else and are still referenced in another item === | ||
<syntaxhighlight lang="sparql"> | |||
SELECT DISTINCT ?o | |||
WHERE | |||
{ | |||
?o owl:sameAs ?sa . | |||
?new ?p ?o | |||
} | |||
</syntaxhighlight> |
Revision as of 15:29, 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
SELECT DISTINCT ?o
WHERE
{
?o owl:sameAs ?sa .
?new ?p ?o
}