query-73b9b4c0429423f0d78e168514215087
All itch.io URLs SELECT ?item ?itemLabel (SAMPLE(?typeLabel) as ?nature) ?propertyLabel ?url WITH { SELECT ?property WHERE { ?property rdf:type wikibase:Property. ?property wikibase:propertyType wikibase:Url . } } AS %properties WITH { SELECT ?item ?url ?property WHERE { INCLUDE %properties . ?property wikibase:directClaim ?wdt. ?item ?wdt ?url. FILTER regex (STR(?url), "itch.io"). } } AS %items WHERE { INCLUDE %items. ?item wdt:P31 ?type. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?type rdfs:label ?typeLabel. ?item rdfs:label ?itemLabel. ?property rdfs:label ?propertyLabel. } } GROUP BY ?item ?itemLabel ?propertyLabel ?url
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# All itch.io URLs
SELECT ?item ?itemLabel (SAMPLE(?typeLabel) as ?nature) ?propertyLabel ?url
WHERE {
{
SELECT ?item ?url ?property WHERE {
{
SELECT ?property WHERE {
?property rdf:type wikibase:Property.
?property wikibase:propertyType wikibase:Url .
}
}.
?property wikibase:directClaim ?wdt.
?item ?wdt ?url.
FILTER regex (STR(?url), "itch.io").
}
}
?item wdt:P31 ?type.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?type rdfs:label ?typeLabel.
?item rdfs:label ?itemLabel.
?property rdfs:label ?propertyLabel.
}
} GROUP BY ?item ?itemLabel ?propertyLabel ?url
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?item"):::projected
v7("?itemLabel"):::projected
v9("?nature")
v2("?property")
v8("?propertyLabel"):::projected
v5("?type")
v6("?typeLabel"):::projected
v1("?url"):::projected
v3("?wdt")
c5(["wikibase:Url"]):::iri
c9(["bd:serviceParam"]):::iri
c3(["wikibase:Property"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["regex(str(?url),'itch.io')"]]
f0 --> v1
v2 --"a"--> c3
v2 --"wikibase:propertyType"--> c5
v2 --"wikibase:directClaim"--> v3
v4 -->v3--> v1
v4 --"wdt:P31"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
v5 --"rdfs:label"--> v6
v4 --"rdfs:label"--> v7
v2 --"rdfs:label"--> v8
end
bind2[/"sample(?typeLabel)"/]
v6 --o bind2
bind2 --as--o v9