query-8ca3baed5d358be144e4ebdf887f56c6
Special:ItemDisambiguation surrogate SELECT ?item ?label ?lang ?desc WHERE { { { ?item rdfs:label ?label } UNION { ?item skos:altLabel ?label } } FILTER (lcase(str(?label)) = lcase("John Campbell") ) #filter(lang(?label)="en") . BIND (lang(?label) AS ?lang) . OPTIONAL { ?item schema:description ?desc . FILTER(lang(?desc)="en") } } LIMIT 500
Use at
- https://query.wikidata.org/sparql
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#Special:ItemDisambiguation surrogate
SELECT ?item ?label ?lang ?desc
WHERE
{
{
{ ?item rdfs:label ?label }
UNION
{ ?item skos:altLabel ?label }
}
FILTER (lcase(str(?label)) = lcase("John Campbell") )
#filter(lang(?label)="en") .
BIND (lang(?label) AS ?lang) .
OPTIONAL { ?item schema:description ?desc . FILTER(lang(?desc)="en") }
}
LIMIT 500
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?desc"):::projected
v3("?item"):::projected
v1("?label"):::projected
v4("?lang"):::projected
f0[["lower-case(str(?label)) = lower-case('John Campbell')"]]
f0 --> v1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"skos:altLabel"--> v1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"rdfs:label"--> v1
end
union0r <== or ==> union0l
end
bind1[/"?label"/]
v1 --o bind1
bind1 --as--o v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."schema:description".-> v2
end