query-ac6ef8cd31053ffe0a3b42787508be55
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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?P953url ?P973url
WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Search";
wikibase:endpoint "www.wikidata.org";
mwapi:srsearch "www.gamespot.com".
?item wikibase:apiOutputItem mwapi:title .
}
filter(bound(?item))
optional {?item wdt:P953 ?P953url.
filter(contains(str(?P953url),"https://www.gamespot.com/companies"))}
optional {?item wdt:P973 ?P973url.
filter(contains(str(?P973url),"https://www.gamespot.com/companies"))}
filter(bound(?P973url)||bound(?P953url))
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("?P953url"):::projected
v1("?P973url"):::projected
v3("?item"):::projected
c7(["www.wikidata.org"]):::literal
c9(["www.gamespot.com"]):::literal
c3(["bd:serviceParam"]):::iri
c5(["Search"]):::literal
c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c11(["mwapi:title"]):::iri
f0[["(bound(?P973url) || bound(?P953url))"]]
f0 --> v1
f0 --> v2
f1[["bound(?item)"]]
f1 --> v3
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c3 --"mwapi:api"--> c5
c3 --"mwapi:endpoint"--> c7
c3 --"mwapi:srsearch"--> c9
v3 --"mwapi:apiOutputItem"--> c11
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P953".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P973".-> v1
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c3 --"mwapi:language"--> c16
end