query-8aa79be372e7c43f90553571d1f3b223

rq turtle/ttl

MWAPI

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?itemID ?Property ?Value ?Reference ?trwiki WHERE {
    ?Category wdt:P31 wd:Q4167836.
     ?Category wdt:P4224 wd:Q17051044.
       ?Category p:P4224 ?P4224_p.
           ?P4224_p pq:P131 ?P131.
  ?link schema:about ?Category; schema:isPartOf <https://tr.wikipedia.org/>; schema:name ?title.
  SERVICE wikibase:mwapi {
     bd:serviceParam wikibase:api "Generator".
     bd:serviceParam wikibase:endpoint "tr.wikipedia.org".
     bd:serviceParam mwapi:gcmtitle ?title.
     bd:serviceParam mwapi:generator "categorymembers".
     bd:serviceParam mwapi:gcmprop "title".
     bd:serviceParam mwapi:gcmlimit "max".
     ?member wikibase:apiOutput mwapi:title.
     ?ns wikibase:apiOutput "@ns".
     ?item wikibase:apiOutputItem mwapi:item.
  }
        FILTER (?ns = "0")
        ?item wdt:P31 wd:Q17051044.
           FILTER(NOT EXISTS { ?item wdt:P131 _:b0. })
     BIND(REPLACE(STR(?item), "http://www.wikidata.org/entity/", "") AS ?itemID)
     BIND(REPLACE(STR(?P131), "http://www.wikidata.org/entity/", "") AS ?Value)
     BIND(CONCAT("P131") AS ?Property)
     BIND(CONCAT("S143") AS ?Reference)
     BIND(CONCAT("Q58255") AS ?trwiki)
}
LIMIT 50

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?Category") v5("?P131") v4("?P4224_p") v11("?Property"):::projected v12("?Reference"):::projected v10("?Value"):::projected v1("?item") v9("?itemID"):::projected v6("?link") v8("?member") v2("?ns") v7("?title") v13("?trwiki"):::projected a1((" ")) c30(["mwapi:item"]):::iri c28(["@ns"]):::literal c23(["title"]):::literal c18(["tr.wikipedia.org"]):::literal c14(["bd:serviceParam"]):::iri c11([https://tr.wikipedia.org/]):::iri c25(["max"]):::literal c6(["wd:Q17051044"]):::iri c21(["categorymembers"]):::literal c4(["wd:Q4167836"]):::iri c27(["mwapi:title"]):::iri c16(["Generator"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P131"--> e0a1 e0v1("?item"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> a1 v1 --"p:direct/P131"--> a1 f1[["?ns = '0'"]] f1 --> v2 v3 --"p:direct/P31"--> c4 v3 --"p:direct/P4224"--> c6 v3 --"p:P4224"--> v4 v4 --"p:qualifier/P131"--> v5 v6 --"schema:about"--> v3 v6 --"schema:isPartOf"--> c11 v6 --"schema:name"--> v7 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c14 --"mwapi:api"--> c16 c14 --"mwapi:endpoint"--> c18 c14 --"mwapi:gcmtitle"--> v7 c14 --"mwapi:generator"--> c21 c14 --"mwapi:gcmprop"--> c23 c14 --"mwapi:gcmlimit"--> c25 v8 --"mwapi:apiOutput"--> c27 v2 --"mwapi:apiOutput"--> c28 v1 --"mwapi:apiOutputItem"--> c30 end v1 --"p:direct/P31"--> c6 bind2[/"replace(str(?item),'http://www.wikidata.org/entity/','')"/] v1 --o bind2 bind2 --as--o v9 bind3[/"replace(str(?P131),'http://www.wikidata.org/entity/','')"/] v5 --o bind3 bind3 --as--o v10 bind4[/"concat('P131')"/] bind4 --as--o v11 bind5[/"concat('S143')"/] bind5 --as--o v12 bind6[/"concat('Q58255')"/] bind6 --as--o v13