Graph query clauses to most restrictive first