Can we call the below query a recursive query? if not, what can we call it?
select ?x ?y
where{
?x p1* ?y
}
Yes, property path operators, such as *
, offer a limited recursion in SPARQL. However, note that variables are not allowed in property paths, so your query is syntactically invalid.