query-b8fc2098c07114d5e58810522285c231
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?TTDB (URI(REPLACE(?pattern, '\\$1', ?TTDB)) AS ?TTDB_URL) ?enWP_article ?Website {
wd:P4079 wdt:P1630 ?pattern .
?item wdt:P4079 ?TTDB .
OPTIONAL { ?enWP_article schema:about ?item; schema:isPartOf <https://en.wikipedia.org/> } .
OPTIONAL { ?item wdt:P856 ?Website } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?TTDB"):::projected
v6("?TTDB_URL")
v5("?Website"):::projected
v4("?enWP_article"):::projected
v2("?item"):::projected
v1("?pattern"):::projected
c6([https://en.wikipedia.org/]):::iri
c9(["bd:serviceParam"]):::iri
c11(["en"]):::literal
c1(["wd:P4079"]):::iri
c1 --"wdt:P1630"--> v1
v2 --"wdt:P4079"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v2
v4 --"schema:isPartOf"--> c6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P856".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind0[/"replace(?pattern,'\$1',?TTDB)"/]
v1 --o bind0
v3 --o bind0
bind0 --as--o v6