PREFIX owl: <http://www.w3.org/2002/07/owl#> 
PREFIX : <http://example.org/test#>

SELECT * 
WHERE { ?parent a [
       a owl:Restriction ;
       owl:onProperty :hasChild ;
       owl:someValuesFrom owl:Thing ] . }
