query-41c28c4503220849f41fbff3e67a4b58
Federated and sequential query with correlation
Use at
- https://query.wikidata.org/sparql
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?author ?author_name ?page_name ?wd_item
WHERE {
{
SELECT DISTINCT ?author ?author_name ?page_name
WHERE {
SERVICE <http://dbpedia.org/sparql> {
?author rdf:type dbo:Writer;
prov:wasDerivedFrom ?derivedfrom.
?author rdfs:label ?author_name. FILTER(LANG(?author_name) = "en")
BIND(STRBEFORE(STR(?derivedfrom), "?") AS ?page_name1)
BIND(URI(REPLACE(?page_name1, "^http", "https")) AS ?page_name)
}
}
LIMIT 100
} ?page_name schema:about ?wd_item.
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?author"):::projected
v1("?author_name"):::projected
v3("?derivedfrom")
v5("?page_name"):::projected
v4("?page_name1")
v6("?wd_item"):::projected
c4([http://dbpedia.org/ontology/Writer]):::iri
subgraph s1["http://dbpedia.org/sparql"]
style s1 stroke-width:4px;
f0[["?author_name = 'en'"]]
f0 --> v1
v2 --"a"--> c4
v2 --"prov:wasDerivedFrom"--> v3
v2 --"rdfs:label"--> v1
bind1[/"substring-before(str(?derivedfrom),'?')"/]
v3 --o bind1
bind1 --as--o v4
bind2[/"replace(?page_name1,'^http','https')"/]
v4 --o bind2
bind2 --as--o v5
end
v5 --"schema:about"--> v6