query-156a445f45173c80eb24dce300a869d5
Propertiesinstance of (P31)Commons category (P373)
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?commonscat
{
SERVICE wikibase:mwapi
{
bd:serviceParam wikibase:endpoint "www.wikidata.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:generator "random" .
bd:serviceParam mwapi:list "usercontribs" .
bd:serviceParam mwapi:ucuser "Jarekt" .
bd:serviceParam mwapi:ucprop "title|timestamp|comment" .
bd:serviceParam mwapi:ucnamespace "0" .
bd:serviceParam mwapi:ucshow "new" .
bd:serviceParam mwapi:uclimit "1" .
?created wikibase:apiOutput "//api/query/usercontribs/item/@timestamp" .
?comment wikibase:apiOutput "//api/query/usercontribs/item/@comment" .
?item wikibase:apiOutputItem "//api/query/usercontribs/item/@title" .
bd:serviceParam wikibase:limitContinuations "249" .
}
MINUS { ?item wdt:P31 [] }
OPTIONAL {?item wdt:P373 ?commonscat} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?comment")
v4("?commonscat"):::projected
v1("?created")
v3("?item"):::projected
a1((" "))
c22(["//api/query/usercontribs/item/@timestamp"]):::literal
c10(["usercontribs"]):::literal
c8(["random"]):::literal
c2(["bd:serviceParam"]):::iri
c23(["//api/query/usercontribs/item/@comment"]):::literal
c4(["www.wikidata.org"]):::literal
c12(["Jarekt"]):::literal
c14(["title|timestamp|comment"]):::literal
c18(["new"]):::literal
c25(["//api/query/usercontribs/item/@title"]):::literal
c16(["0"]):::literal
c20(["1"]):::literal
c27(["249"]):::literal
c32(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c6(["Generator"]):::literal
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:endpoint"--> c4
c2 --"mwapi:api"--> c6
c2 --"mwapi:generator"--> c8
c2 --"mwapi:list"--> c10
c2 --"mwapi:ucuser"--> c12
c2 --"mwapi:ucprop"--> c14
c2 --"mwapi:ucnamespace"--> c16
c2 --"mwapi:ucshow"--> c18
c2 --"mwapi:uclimit"--> c20
v1 --"mwapi:apiOutput"--> c22
v2 --"mwapi:apiOutput"--> c23
v3 --"mwapi:apiOutputItem"--> c25
c2 --"mwapi:limitContinuations"--> c27
end
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P31"--> a1
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P373".-> v4
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c2 --"mwapi:language"--> c32
end