query-78b2d3bd305c75b9bd6b2dc47729db34
: Maybe this will help:Alina data@ ! Example : Template:Id urlAnd it’s done on {{Sparql|query=select ?edition ?editionurl where { {{Id url|?edition|P1025|?editionurl}} } }} gives Usage Every editions from sudoc known to wikidata with their uris|?edition|SUDOC editions|?editionurl}}Id url{{ or |?edition|P1025|?editionurl}}Id url{{ ?edition wdt:P1025 ?ideditionP1025 . ?directeditionP1025 wikibase:directClaim wdt:P1025 . ?directeditionP1025 wikibase:propertyType wikibase:ExternalId . ?directeditionP1025 wdt:P1630 ?baseurleditionP1025 . BIND(IRI(REPLACE(?ideditionP1025, '^(.+)$', ?baseurleditionP1025 )) AS ?editionurl). Used in a full query (wikitext): {{Sparql|query=select ?edition ?editionurl where { {{Id url|?edition|P1025|?editionurl}} } }} gives
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
select ?edition ?editionurl where {
?edition wdt:P1025 ?ideditionP1025 .
?directeditionP1025 wikibase:directClaim wdt:P1025 .
?directeditionP1025 wikibase:propertyType wikibase:ExternalId .
?directeditionP1025 wdt:P1630 ?baseurleditionP1025 .
BIND(IRI(REPLACE(?ideditionP1025, '^(.+)$', ?baseurleditionP1025 )) AS ?editionurl).
}
Query found at
- https://www.wikidata.org/wiki/Template:Id_url
- https://www.wikidata.org/wiki/Template:Id_url/doc
- https://www.wikidata.org/wiki/Wikidata_talk:SPARQL_query_service/queries