A compound complex sentence contains at least two independent clauses like a compound sentence and at least one dependent clause like a complex sentence. In the given sentence, “the dog lived in the garden” has an independent clause having a subject “dog” and predicate “lived.” The phrase “who was smarter” is dependent clause which has the subject “the cat.”