Hi Iman,
One first thing to note about this query:
> SELECT Distinct ?worker ?name
> WHERE
> {
> ?z rdfs:subClassOf <http://imise/SNIK/Human_ressource>.
>
> ?y rdfs:subClassOf <http://imise/SNIK/Staff>.
>
> ?worker a ?y.
>
> }
Not that ?z has no relation with ?worker or ?y at all.
This is probably not what you meant.
Also, the query seems incomplete; the above won't execute.
Where does ?name come from?
I think you mean something along the lines of:
SELECT DISTINCT ?worker
{
?y rdfs:subClassOf* <http://imise/SNIK/Staff>.
?worker a ?y.
}
Note the asterisk * after rdfs:subClassOf (this is a SPARQL 1.1 feature)
so that the class itself and deeper subclasses are also matched.
Best,
Ruben