PREFIX ex: PREFIX ns: SELECT ?s { ?_x ex:s ?s . FILTER (ns:starts-with(?s, "fi") && ns:ends-with(?s, "h")) } ORDER BY ?s