query-5e0c419364f607f1ddbdd6ed6db234a1
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX mw: <http://tools.wmflabs.org/mw2sparql/ontology#>
SELECT ?item ?topic (SAMPLE(?site) AS ?source) {
VALUES ?cat { wd:Q16812164 wd:Q16805075 wd:Q16790359 wd:Q16805569 wd:Q7321864 wd:Q7007416 wd:Q7323268 wd:Q7321877 wd:Q16075205 wd:Q16805083
wd:Q16816272 wd:Q16816733 wd:Q16817062 wd:Q16805088 wd:Q8844580 wd:Q8834819 wd:Q8791284 wd:Q16792015 wd:Q8602375 wd:Q8834813 }
?cat wdt:P4224 ?topic . ?wikicat schema:about ?cat
SERVICE <http://tools.wmflabs.org/mw2sparql/sparql> {
?page mw:inCategory ?wikicat
}
?page schema:about ?item; schema:isPartOf ?url .
?site wdt:P31 wd:Q10876391; wdt:P856 ?url
} GROUP BY ?item ?topic
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?cat")
v5("?item"):::projected
v4("?page")
v7("?site"):::projected
v8("?source")
v2("?topic"):::projected
v6("?url")
v3("?wikicat")
c7(["wd:Q10876391"]):::iri
bind0[/VALUES ?cat/]
bind0-->v1
bind00(["wd:Q16812164"])
bind00 --> bind0
bind01(["wd:Q16805075"])
bind01 --> bind0
bind02(["wd:Q16790359"])
bind02 --> bind0
bind03(["wd:Q16805569"])
bind03 --> bind0
bind04(["wd:Q7321864"])
bind04 --> bind0
bind05(["wd:Q7007416"])
bind05 --> bind0
bind06(["wd:Q7323268"])
bind06 --> bind0
bind07(["wd:Q7321877"])
bind07 --> bind0
bind08(["wd:Q16075205"])
bind08 --> bind0
bind09(["wd:Q16805083"])
bind09 --> bind0
bind010(["wd:Q16816272"])
bind010 --> bind0
bind011(["wd:Q16816733"])
bind011 --> bind0
bind012(["wd:Q16817062"])
bind012 --> bind0
bind013(["wd:Q16805088"])
bind013 --> bind0
bind014(["wd:Q8844580"])
bind014 --> bind0
bind015(["wd:Q8834819"])
bind015 --> bind0
bind016(["wd:Q8791284"])
bind016 --> bind0
bind017(["wd:Q16792015"])
bind017 --> bind0
bind018(["wd:Q8602375"])
bind018 --> bind0
bind019(["wd:Q8834813"])
bind019 --> bind0
v1 --"wdt:P4224"--> v2
v3 --"schema:about"--> v1
subgraph s1["http://tools.wmflabs.org/mw2sparql/sparql"]
style s1 stroke-width:4px;
v4 --http://tools.wmflabs.org/mw2sparql/ontology#inCategory--> v3
end
v4 --"schema:about"--> v5
v4 --"schema:isPartOf"--> v6
v7 --"wdt:P31"--> c7
v7 --"wdt:P856"--> v6
bind2[/"sample(?site)"/]
v7 --o bind2
bind2 --as--o v8