query-c4d47dd2516514628a4160e9e2616ef5
Urls
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?taxonName ?url ?urlBase ?urlId WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P1421 ?url1 . # P1348=AlgaeBase, P1421=GRIN, P1991=LPSN
#?item p:P1421 ?urlStatement .
#FILTER NOT EXISTS {
# ?urlStatement prov:wasDerivedFrom ?ref .
#}
BIND(str(?url1) as ?url)
BIND(if(contains(?url, "?"), strbefore(?url, "?"), ?url) as ?urlBase)
BIND(if(contains(?url, "?"), strafter(?url, "?"), ?url) as ?urlId)
}
#ORDER BY ASC(?taxonName)
LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?taxonName"):::projected
v4("?url"):::projected
v3("?url1")
v5("?urlBase"):::projected
v6("?urlId"):::projected
v1 --"p:direct/P225"--> v2
v1 --"p:direct/P1421"--> v3
bind0[/"str(?url1)"/]
v3 --o bind0
bind0 --as--o v4
bind1[/"if(contains(?url,'?'),substring-before(?url,'?'),?url)"/]
v4 --o bind1
bind1 --as--o v5
bind2[/"if(contains(?url,'?'),substring-after(?url,'?'),?url)"/]
v4 --o bind2
bind2 --as--o v6