query-46cae33cd44247e06ade27af65fa648b
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?statement ?subject ?subjectLabel ?refURL
WHERE {
{
SELECT DISTINCT ?subject
WHERE {
{
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org";
wikibase:api "Generator";
mwapi:generator "exturlusage";
mwapi:geulimit "500";
mwapi:geuquery "*.etheses.lse.ac.uk";
mwapi:geuprotocol "http";
mwapi:geunamespace "0" .
?title wikibase:apiOutput mwapi:title.
}
} UNION {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org";
wikibase:api "Generator";
mwapi:generator "exturlusage";
mwapi:geulimit "500";
mwapi:geuquery "*.etheses.lse.ac.uk";
mwapi:geuprotocol "https";
mwapi:geunamespace "0" .
?title wikibase:apiOutput mwapi:title.
}
}
BIND(IRI(CONCAT(STR(wd:), ?title)) AS ?subject)
}
}.
?subject ?p ?statement .
?statement prov:wasDerivedFrom/pr:P854 ?refURL .
FILTER (CONTAINS(str(?refURL), 'etheses.lse.ac.uk')) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?p")
v1("?refURL"):::projected
v5("?statement"):::projected
v3("?subject"):::projected
v2("?title")
a1((" "))
c3(["bd:serviceParam"]):::iri
c20(["https"]):::literal
c13(["*.etheses.lse.ac.uk"]):::literal
c5(["www.wikidata.org"]):::literal
c25(["en"]):::literal
c17(["0"]):::literal
c11(["500"]):::literal
c9(["exturlusage"]):::literal
c15(["http"]):::literal
c19(["mwapi:title"]):::iri
c7(["Generator"]):::literal
f0[["contains(str(?refURL),'etheses.lse.ac.uk')"]]
f0 --> v1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c3 --"mwapi:endpoint"--> c5
c3 --"mwapi:api"--> c7
c3 --"mwapi:generator"--> c9
c3 --"mwapi:geulimit"--> c11
c3 --"mwapi:geuquery"--> c13
c3 --"mwapi:geuprotocol"--> c20
c3 --"mwapi:geunamespace"--> c17
v2 --"mwapi:apiOutput"--> c19
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c3 --"mwapi:endpoint"--> c5
c3 --"mwapi:api"--> c7
c3 --"mwapi:generator"--> c9
c3 --"mwapi:geulimit"--> c11
c3 --"mwapi:geuquery"--> c13
c3 --"mwapi:geuprotocol"--> c15
c3 --"mwapi:geunamespace"--> c17
v2 --"mwapi:apiOutput"--> c19
end
end
union0r <== or ==> union0l
end
bind1[/"concat(str('wd:'),?title)"/]
v2 --o bind1
bind1 --as--o v3
v3 -->v4--> v5
v5 --"prov:wasDerivedFrom"--> a1
a1 --"pr:P854"--> v1
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c3 --"mwapi:language"--> c25
end