query-b830b3b74d503191808aa3f584cf92fc
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?f ?f2 WHERE
{
# VALUES ?item {wd:Q11518} # uncomment to focus on known item
?item wdt:P2534 ?f . # item has a defining formula
bind(str(?f) as ?f2) # render formula as string
FILTER REGEX(?f2, "c\\^\\{2\\}\\=a\\^\\{2\\}\\+b\\^\\{2\\}") # regex finds c^{2}=a^{2}+b^{2}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # get labels
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?f"):::projected
v4("?f2"):::projected
v2("?item"):::projected
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["regex(?f2,'c\^\{2\}\=a\^\{2\}\+b\^\{2\}')"]]
f0 --> v4
v2 --"wdt:P2534"--> v3
bind1[/"str(?f)"/]
v3 --o bind1
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end