query-f1e4dfb821a83d852fecf0cf4f5b7b8f

rq turtle/ttl

SPARQL query

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT (STRAFTER(STR(?item), STR(wd:)) AS ?wikidata) ?twitter WHERE {
    ?item wdt:P31 wd:Q5; wdt:P39 wd:Q30524710.
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    OPTIONAL { ?item wdt:P2002 ?twitter. }
  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?twitter"):::projected v3("?wikidata") c6(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c4(["wd:Q30524710"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P31"--> c2 v1 --"wdt:P39"--> c4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2002".-> v2 end bind0[/"substring-after(str(?item),str('wd:'))"/] v1 --o bind0 bind0 --as--o v3