A set of SPARQL examples
New items by user.
PREFIX mwapi: <https://www.mediawiki.org/ontology#API/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX hint: <http://www.bigdata.com/queryHints#>
#title: Latest itmes by a user
SELECT ?title ?titleLabel WHERE {
hint:Query hint:optimizer "None".
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org";
wikibase:api "Generator";
mwapi:generator "recentchanges";
mwapi:grcnamespace "0";
mwapi:grctype "new";
mwapi:grcuser "Ainali";
.
?title wikibase:apiOutputItem mwapi:title.
}
FILTER BOUND (?title)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
ORDER BY DESC(?title)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?title"):::projected
c7(["www.wikidata.org"]):::literal
c15(["new"]):::literal
c19([https://www.mediawiki.org/ontology#API/title]):::iri
c22(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
c13(["0"]):::literal
c5([http://www.bigdata.com/rdf#serviceParam]):::iri
c1([http://www.bigdata.com/queryHints#Query]):::iri
c3(["None"]):::literal
c11(["recentchanges"]):::literal
c17(["Ainali"]):::literal
c9(["Generator"]):::literal
f0[["bound(?title)"]]
f0 --> v1
c1 --http://www.bigdata.com/queryHints#optimizer--> c3
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c5 --"wikibase:endpoint"--> c7
c5 --"wikibase:api"--> c9
c5 --https://www.mediawiki.org/ontology#API/generator--> c11
c5 --https://www.mediawiki.org/ontology#API/grcnamespace--> c13
c5 --https://www.mediawiki.org/ontology#API/grctype--> c15
c5 --https://www.mediawiki.org/ontology#API/grcuser--> c17
v1 --"wikibase:apiOutputItem"--> c19
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c5 --"wikibase:language"--> c22
end