query-9bfe223c06ed833b3fe5a05edcf767ac

rq turtle/ttl

TODO

Use at

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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?sitelink ?duplicate_of ?duplicate_ofLabel ?d_sitelink ?typeLabel
WHERE 
{
  ?article schema:about ?item ;
  schema:isPartOf <https://ta.wikipedia.org/> ; 
  schema:name ?sitelink .
  ?item p:P31 ?stat . 
  ?stat ps:P31 wd:Q17362920 . 
  OPTIONAL {?stat pq:P642 ?duplicate_of .
            OPTIONAL  { ?d_article schema:about ?duplicate_of ;
                        schema:isPartOf <https://ta.wikipedia.org/> ; 
                        schema:name ?d_sitelink .} 
             OPTIONAL  { ?duplicate_of wdt:P31 ?type . }
           }
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'ta' }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?article") v6("?d_article") v7("?d_sitelink"):::projected v5("?duplicate_of"):::projected v2("?item"):::projected v3("?sitelink"):::projected v4("?stat") v8("?type") c3([https://ta.wikipedia.org/]):::iri c13(["ta"]):::literal c11(["bd:serviceParam"]):::iri c7(["wd:Q17362920"]):::iri v1 --"schema:about"--> v2 v1 --"schema:isPartOf"--> c3 v1 --"schema:name"--> v3 v2 --"p:P31"--> v4 v4 --"p:statement/P31"--> c7 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P642".-> v5 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v6 -."schema:about".-> v5 v6 --"schema:isPartOf"--> c3 v6 --"schema:name"--> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P31".-> v8 end end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end