Which is a compound sentence?

 - Tracy knew the answer to the question, so she raised her hand.
 - The beavers gnaw on logs by the riverbank.
The first sentence is the compound sentence. It is made up of two simple sentences joined by a comma and the conjunction so.
Tracy knew the answer to the question, so she raised her hand.