A compound sentence combines two simple sentences with a coordinating conjunction (one of the FANBOYS).
Mom is baking a cake, and Dad is mowing the lawn.
Notice that we place a comma just before the conjunction and.
A complex sentence contains a subordinate clause. When you add a subordinate clause to a compound sentence, you make a compound-complex sentence.
Because we are having company for dinner, Mom is baking a cake, and Dad is mowing the lawn.
We put a comma after the subordinate clause, and we put a second comma before the coordinating conjunction.
Here are some more examples of the compound-complex sentence:
When you are finished with your homework, we can watch a movie, or we can take a walk.
Before you lock the door, I want to close the windows, so we don’t get rain in the house.
If you know how to play piano, I can play guitar, and we can be a musical group.
In a compound-complex sentence, a comma goes after the subordinate clause and before the coordinating conjunction.
▶Now you try it. Place two commas into this sentence. When the rain stops we can take a walk and we can look for a rainbow. Did you place one comma after the subordinate clause and the other comma before the conjunction? Good for you!