Select whether the sentence below is a simple, compound, complex or compound-complex sentence

However, when David came to conquer the city with his army, he discovered that the Jebusites got their drinking water from a spring just outside the city walls.
CxCd or Cx

Subordinate clauses:

that the Jebusites got their drinking water from a spring just outside the city walls.

However, when David came to conquer the city with his army,

Independent clause:
he discovered

The given sentence is a compound-complex sentence.

To determine this, we first need to identify the sentence's main clause and any subordinate clauses.

The main clause in this sentence is: "However, when David came to conquer the city with his army, he discovered that the Jebusites got their drinking water from a spring just outside the city walls."

Now, let's identify the subordinate clauses within this sentence:

1. "when David came to conquer the city with his army" - This is a subordinate clause that acts as an adverbial phrase, indicating the time when the action took place.

2. "that the Jebusites got their drinking water from a spring just outside the city walls" - This is a subordinate clause that acts as an object of the main clause. It provides additional information about what David discovered.

Since the given sentence contains both a main clause and subordinate clauses, it is categorized as a compound-complex sentence.