query-5bd91d0189cef8885bf9c1772920c3fe

rq turtle/ttl

raw Q-code values ? https://example.com?wikidata_id=123Hi, how i can get the raw q-item values out of the item? In example if my query is like this and i want to get links like

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 ?item ?itemLabel (concat("https://example.com?wikidata_id=", substr(str(?item),32,300)) as ?link)
WHERE
{
    ?item wdt:P31 wd:Q146 .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
LIMIT 5

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?link") c2(["wd:Q146"]):::iri c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P31"--> c2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end bind0[/"concat('https://example.com?wikidata_id=',substring(str(?item),'32^^xsd:integer','300^^xsd:integer'))"/] v1 --o bind0 bind0 --as--o v2