query-4168afd1bf119b1171a65d18bbaa041c
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?title ?begin WHERE {
?item wdt:P31 wd:Q928830;wdt:P5817 wd:Q55654238.
?article schema:isPartOf <https://fr.wikipedia.org/> ;
schema:about ?item ;
schema:name ?title.
bind (substr(?content, 1, 100) as ?begin).
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "fr.wikipedia.org";
wikibase:api "Generator";
wikibase:limit "once";
mwapi:generator "allpages";
mwapi:gapfrom ?title;
mwapi:gaplimit 1;
mwapi:prop "revisions";
mwapi:rvprop "content".
?content wikibase:apiOutput 'revisions/rev/text()' .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?article")
v4("?begin"):::projected
v5("?content")
v1("?item"):::projected
v3("?title"):::projected
c25(["content"]):::literal
c2(["wd:Q928830"]):::iri
c10(["bd:serviceParam"]):::iri
c18(["allpages"]):::literal
c23(["revisions"]):::literal
c4(["wd:Q55654238"]):::iri
c6([https://fr.wikipedia.org/]):::iri
c27(["revisions/rev/text()"]):::literal
c21(["1^^xsd:integer"]):::literal
c12(["fr.wikipedia.org"]):::literal
c16(["once"]):::literal
c14(["Generator"]):::literal
v1 --"wdt:P31"--> c2
v1 --"wdt:P5817"--> c4
v2 --"schema:isPartOf"--> c6
v2 --"schema:about"--> v1
v2 --"schema:name"--> v3
bind0[/"substring(?content,'1^^xsd:integer','100^^xsd:integer')"/]
v5 --o bind0
bind0 --as--o v4
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c10 --"mwapi:endpoint"--> c12
c10 --"mwapi:api"--> c14
c10 --"mwapi:limit"--> c16
c10 --"mwapi:generator"--> c18
c10 --"mwapi:gapfrom"--> v3
c10 --"mwapi:gaplimit"--> c21
c10 --"mwapi:prop"--> c23
c10 --"mwapi:rvprop"--> c25
v5 --"mwapi:apiOutput"--> c27
end