That (Not 'which*) is normally used after words like all any anything everything, a few and the only one when they do not refer to people. Clauses of this kind are always defining:
All that remains for me to do is to say goodbye
Everything that can be done has been done
I'll do anything (that) I can
Who is used after all, any and a few when they refer to people: God bless this ship and all who sail in her [> 5.24]
That is also common after superlatives. It is optional when it refers to the object [> 6.28.1]:
It's the silliest argument (that) I've ever heard but not optional when it refers to the subject:
Bach's the greatest composer that's (or who's) ever lived.
1.41 'Of' + relative referring to number/quantity
Of can be used before whom and which in non-defining clauses to refer to number or quantity after numbers and words like the following: a few several some, any, many much (of which), the majority, most all, none either/neither the largest/the smallest, the oldest/the youngest; a number half a quarter
Both players neither of whom reached the final, played well The treasure some of which has been recovered has been sent to the British Museum
Which' in place of a clause
Which can be used to refer to a whole clause, not just one word. In such cases, it can be replaced by and this or and that:
She married Joe which (= and this/that) surprised everyone
Which, in the sense of this or that, can also be used in expressions
such as in which case at which point, on which occasion, which can
refer back to a complete clause:
/ may have to work late, in which case I'll telephone
The speaker paused to examine his notes, at which point a loud
crash was heard
Which, in the sense of this or that, can replace a whole sentence and, in informal style, can even begin a sentence:
He was fined £500 Which we all thought served him right
1 The sentence
Reference in relative clauses
A relative clause follows the person or thing it refers to as closely as
possible to avoid ambiguity Compare
/ cut out the advertisement which you wanted in yesterday s paper (an unambiguous reference to the advertisement) I cut out the advertisement in yesterday’s paper which you wanted (which could refer either to the advertisement or the paper)
A sentence can contain more than one relative
It s the only building (which) I ve ever seen which is made entirely of glass (The first which would normally be omitted)
The complex sentence: adverbial clauses
How to identify an adverbial clause