I know a farmhouse {in which | where} we can spend the night.

Where is an adverb of place, modifying can spend. But it also introduces the subordinate clause, as the relative pronoun which does. Hence where is called a relative adverb.

195. The principal relative adverbs are:—where, whence, whither, wherever, when, whenever, while, as, how, why, before, after, till, until, since.

Because of their similarity to conjunctions, these words are often called conjunctive adverbs.

As and since in the sense of “because,” and while in the sense of “although,” are classed as conjunctions ([§ 368]).

The clauses introduced by relative adverbs may be either adjective or adverbial ([§§ 49–50], [379–382]).

Note. In “The more you waste, the sooner you will want” (and similar sentences) the is not an article, but an old case-form of the pronoun that, used as an adverb of degree. We may expand the sentence as follows: “To what extent you waste more, to that extent you will want sooner.” Thus it appears that the first the has a relative force, and the second the a demonstrative force.

196. An interrogative adverb introduces a question.

Where, when, whence, whither, how, why, may be used as interrogative adverbs. Thus,—