This sentence is a complex sentence because a subordinating conjunction joins the two clauses.
Step-by-step explanation:
When two independent clauses are joined together by a coordinating conjunction (and, but, yet, so, for, nor, or), in addition to either a comma or a semi-colon, the sentence is said to be a compound sentence.
Example: She saw them coming, and laughed out loud.
When a dependent clause and an independent clause are combined together, connected to each other using a subordinating conjunction (who, when, where, than, that, etc.), the sentence is said to be a complex sentence.
Example: Dr. Seuss is a famous author who is primarily known for writing children's books.
When a sentence has a minimum of two independent clauses and at least one dependent clause, it is said to be a compound-complex sentence.
Example: Mary wanted to cook fish for dinner, so she bought some when she went to the market.